21 lines
488 B
C#
21 lines
488 B
C#
using Microsoft.AspNetCore.Mvc;
|
|
using MVC_SimpleCRUD_Layered.Application.People;
|
|
|
|
namespace MVC_SimpleCRUD_Layered.Web.Controllers;
|
|
|
|
public class PeopleSimpleController : Controller
|
|
{
|
|
private readonly IPeopleService peopleService;
|
|
|
|
public PeopleSimpleController(IPeopleService peopleService)
|
|
{
|
|
this.peopleService = peopleService;
|
|
}
|
|
|
|
public async Task<IActionResult> Index()
|
|
{
|
|
var people = await peopleService.GetAllForSimpleListAsync();
|
|
return View(people);
|
|
}
|
|
}
|