public async Task <IActionResult> DeleteAsync([FromRoute] int id) { try { await _workoutService.DeleteAsync(id); return(NoContent()); } catch (EntityNotFoundException) { return(NotFound()); } }
public async Task <IActionResult> Delete([FromRoute] int id) { await _workoutService.DeleteAsync(id); return(RedirectToAction(nameof(Index))); }