Exemplo n.º 1
0
 public async Task <IActionResult> DeleteGender(int id)
 {
     if (await _service.DeleteAsync(id))
     {
         return(NoContent());
     }
     else
     {
         return(NotFound());
     }
 }
Exemplo n.º 2
0
        public async Task <IActionResult> Delete(int id)
        {
            try
            {
                var entity = _service.DeleteAsync(id);

                return(Ok());
            }
            catch (Exception)
            {
                return(BadRequest());
            }
        }
Exemplo n.º 3
0
 public async Task <IActionResult> Delete(int id)
 {
     return(await DeleteAsync(
                async() => await _genderService.GenderExistsAsync(id),
                async() => await _genderService.DeleteAsync(id)));
 }