public Presupuesto Add(Presupuesto entity) { if (entity.Cliente == null || entity.Vehiculo == null || entity.Importe <= 0) { throw new EntityInvalidDataServiceException("Los datos de cliente, vehiculo e importe son requeridos"); } try { unitOfWork.StartProcess(); Presupuesto result = unitOfWork.PresupuestoRepository.Add(entity); unitOfWork.ConfirmProcess(); return(result); } catch (AddEntityRepositoryException ex) { unitOfWork.RollbackProcess(); throw ex; } finally { unitOfWork.EndProcess(); } }