示例#1
0
        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));
        }
示例#2
0
        public async Task <IActionResult> Home()
        {
            var items = await _context.Items.ToListAsync();

            var model = new ToDoItemPageViewModel
            {
                Items     = items,
                PageTitle = "All"
            };

            return(View(model));
        }