public async Task <IActionResult> DeleteAsync([FromRoute] int id) { try { await _adultRepo.DeleteAdultAsync(id); return(Ok()); } catch (Exception e) { Console.WriteLine(e); return(StatusCode(500, e.Message)); } var cena = _fileStorage.Delete(id); if (cena) { return(Ok()); } else { return(NotFound()); } }
public async Task <ActionResult> DeleteAdult([FromRoute] int Id) { try { await _adultService.DeleteAdultAsync(Id); return(Ok()); } catch (Exception e) { Console.WriteLine(e); return(StatusCode(500, e.Message)); } }