MVC (layered variant)
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user