public async Task<IActionResult> OnGetAsync(int? id) { if (id == null) { return NotFound(); } Schedule = await _context.accSchedule.FirstOrDefaultAsync(m => m.IdSchedule == id); if (Schedule == null) { return NotFound(); } return Page(); }
public async Task <IActionResult> OnPostAsync(int?id) { if (id == null) { return(NotFound()); } Schedule = await _context.accSchedule.FindAsync(id); if (Schedule != null) { _context.accSchedule.Remove(Schedule); await _context.SaveChangesAsync(); } return(RedirectToPage("./Index")); }
public void SetSchedule(accSchedule value) { Schedule = value; }