public void Delete(SubastaDto entity)
 {
     try
     {
         uowService.SubastaRepository.Delete(mapper.Map <repository.models.Subasta>(entity));
         uowService.Save();
     }
     catch (ExceptionData)
     {
         throw;
     }
     catch (Exception ex)
     {
         throw new ExceptionCore("error al intentar eliminar la subasta", ex);
     }
 }
 public IActionResult Put(SubastaDto subasta)
 {
     try
     {
         if (!ModelState.IsValid)
         {
             return(BadRequest(ModelState));
         }
         subastaService.Edit(subasta);
         return(Ok(subasta));
     }
     catch (Exception)
     {
         throw;
     }
 }
 public void Edit(SubastaDto dto)
 {
     try
     {
         dto.HoraFin = new DateTime(dto.HoraFin.Year, dto.HoraFin.Month, dto.HoraFin.Day,
                                    dto.HoraFinAux.Hour, dto.HoraFinAux.Minute, dto.HoraFinAux.Second);
         dto.HoraInicio = new DateTime(dto.HoraInicio.Year, dto.HoraInicio.Month, dto.HoraInicio.Day,
                                       dto.HoraInicioAux.Hour, dto.HoraInicioAux.Minute, dto.HoraInicioAux.Second);
         uowService.SubastaRepository.Edit(mapper.Map <repository.models.Subasta>(dto));
         uowService.Save();
     }
     catch (ExceptionData)
     {
         throw;
     }
     catch (Exception ex)
     {
         throw new ExceptionCore("error al intentar editar la subasta", ex);
     }
 }