public ActionResult DeleteUser(int id) { if (medicoService.Delete(id)) { return(NoContent()); } else { return(NotFound()); } }
public ActionResult Delete(Guid id) { try { _medicoService.Delete(id); return(Ok()); } catch (Exception e) { string errors = e.Message; return(ValidationProblem(new ValidationProblemDetails() { Type = "Cannot delete", Detail = errors })); } }
public IActionResult Delete(int id) { if (!Exists(id)) { return(NotFound()); } _medicoRepository.BeginTransaction(); // excluindo var medico = _medicoService.Delete(id); if (_notification.Any) { _medicoRepository.RollbackTransaction(); return(BadRequest()); } _medicoRepository.CommitTransaction(); return(Ok(medico)); }
public void Delete(Guid Id) { service.Delete(Id); }
public IActionResult Delete(int id) { return(Json( _MedicoService.Delete(id) )); }
private void OnDeleteItemCommandExecuted(Medico item) { if(_medicoService.Delete(item) > 0) Medicos.Remove(item); }
public bool Delete(int ID) { return(Medicoservices.Delete(ID)); }
public IActionResult Delete(int crm) { _medicoService.Delete(crm); return(NoContent()); }