public DeletePacienteOut DeletePaciente(DeletePacienteIn input) { DeletePacienteOut output = new DeletePacienteOut() { result = Result.Error }; try { DbContextApplication dbContext = new DbContextApplication(); var paciente = new PruebaNexos.DataLayer.Paciente { Id_Paciente = input.Id, }; dbContext.Entry(paciente).State = EntityState.Deleted; if (dbContext.SaveChanges() > 0) { output.result = Result.Success; } return(output); } catch (Exception e) { output.MensajeExcepcion = "Excepción no controlada por favor comuniquese con el administrador enviele el siguiente mensaje: " + e.Message; return(output); } }
public DeletePacienteOut DeletePaciente(DeletePacienteIn input) { return(paciente.DeletePaciente(input)); }
public DeletePacienteOut DeletePaciente([FromBody] DeletePacienteIn input) { return(paciente.DeletePaciente(input)); }