Esempio n. 1
0
        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);
            }
        }
Esempio n. 2
0
 public DeletePacienteOut DeletePaciente(DeletePacienteIn input)
 {
     return(paciente.DeletePaciente(input));
 }
Esempio n. 3
0
 public DeletePacienteOut DeletePaciente([FromBody] DeletePacienteIn input)
 {
     return(paciente.DeletePaciente(input));
 }