diff --git a/Chapter_34/AutoLot.Web/Areas/Admin/Pages/Makes/Index.cshtml.cs b/Chapter_34/AutoLot.Web/Areas/Admin/Pages/Makes/Index.cshtml.cs index 05973ff..f7afafa 100644 --- a/Chapter_34/AutoLot.Web/Areas/Admin/Pages/Makes/Index.cshtml.cs +++ b/Chapter_34/AutoLot.Web/Areas/Admin/Pages/Makes/Index.cshtml.cs @@ -1,22 +1,17 @@ namespace AutoLot.Web.Areas.Admin.Pages.Makes; -public class IndexModel : PageModel +public class IndexModel : BasePageModel { - private readonly IAppLogging _appLogging; - private readonly IMakeDataService _makeService; - - [ViewData] - public string Title => "Makes"; - - public IndexModel(IAppLogging appLogging, IMakeDataService carService) + public IndexModel( + IAppLogging appLogging, + IMakeDataService makeService) + : base(appLogging, makeService, "Makes") { - _appLogging = appLogging; - _makeService = carService; } public IEnumerable MakeRecords { get; set; } public async Task OnGetAsync() { - MakeRecords = await _makeService.GetAllAsync(); + MakeRecords = await DataService.GetAllAsync(); } -} \ No newline at end of file +}