public async Task <ActionResult <Mode> > DeleteMode(Guid id) { var mode = await _modeService.DeleteModeAsync(id); if (mode == null) { return(NotFound()); } return(mode); }
public async Task <IActionResult> OnPost(Guid id) { if (id == null) { return(BadRequest()); } await _modeService.DeleteModeAsync(id); return(RedirectToPage("./Modes")); }