Пример #1
0
        public async Task <IActionResult> OnGetAsync(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            TodoItem = await _context.Tasks.FirstOrDefaultAsync(m => m.ID == id);

            if (TodoItem == null)
            {
                return(NotFound());
            }

            States = new SelectList(ItemState.GetStateNames());
            return(Page());
        }
Пример #2
0
 public IActionResult OnGet()
 {
     States = new SelectList(ItemState.GetStateNames());
     return(Page());
 }