Create CampaignsController
This commit is contained in:
parent
b840ebd7f6
commit
5d4023649f
21
src/Web/WebMVC/Controllers/CampaignsController.cs
Normal file
21
src/Web/WebMVC/Controllers/CampaignsController.cs
Normal file
@ -0,0 +1,21 @@
|
||||
namespace Microsoft.eShopOnContainers.WebMVC.Controllers
|
||||
{
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.eShopOnContainers.WebMVC.Services;
|
||||
|
||||
[Authorize]
|
||||
public class CampaignsController : Controller
|
||||
{
|
||||
private ICampaignService _campaignService;
|
||||
|
||||
public CampaignsController(ICampaignService campaignService) =>
|
||||
_campaignService = campaignService;
|
||||
|
||||
public IActionResult Index()
|
||||
{
|
||||
var campaignList = _campaignService.GetCampaigns();
|
||||
return View();
|
||||
}
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user