Exemplo n.º 1
0
        public async Task <IActionResult> OnPostDeleteAsync()
        {
            var success = await _context.DeleteAssignmentAsync(Assignment.AssignmentID);

            return(success ? RedirectToPage("/Sessions/Details", new { id = Assignment.SessionID }) : RedirectToPage("/Error"));
        }