public DeleteOfertaResponse DeleteOferta(int ofertaId) { var response = new DeleteOfertaResponse(); try { var oferta = _ofertaRepository.GetOne(x => x.OfertaId == ofertaId); oferta.IsActivo = false; if (_ofertaRepository.Update(oferta) > 0) { response.IsValid = true; } else { response.IsValid = false; response.ErrorMessage = "Error to delete Oferta"; } } catch (Exception ex) { response.IsValid = false; response.ErrorMessage = ex.Message; } return(response); }
public DeleteOfertaResponse DeleteOferta(int ofertaId) { var response = new DeleteOfertaResponse() { IsValid = true }; return(response); }