private IActionResult Returner(string NamePage, int Day = 0) { var items = _context.Items.Where(t => t.Date == DateTime.Today.AddDays(Day)).ToList(); var model = new ToDoItemPageViewModel { Items = items, PageTitle = NamePage }; return(View("Home", model)); }
public async Task <IActionResult> Home() { var items = await _context.Items.ToListAsync(); var model = new ToDoItemPageViewModel { Items = items, PageTitle = "All" }; return(View(model)); }