Exemplo n.º 1
0
        public async Task <IActionResult> DeleteAsync([FromRoute] int id)
        {
            try
            {
                await _workoutService.DeleteAsync(id);

                return(NoContent());
            }
            catch (EntityNotFoundException)
            {
                return(NotFound());
            }
        }
Exemplo n.º 2
0
        public async Task <IActionResult> Delete([FromRoute] int id)
        {
            await _workoutService.DeleteAsync(id);

            return(RedirectToAction(nameof(Index)));
        }