public async Task <IActionResult> OnPostAsync(int?id) { if (id == null) { return(NotFound()); } Project = await _context.Delete(Project.Id); return(RedirectToPage("./Index")); }
public async Task <ActionResult> Delete([Required] int id) { var deletedProject = await _projectDatabase.Delete(id); return(deletedProject == null ? (StatusCodeResult)NotFound() : NoContent()); }