Exemplo n.º 1
0
 public long AddRentalServiceFleet(RentalServiceFleetContract rentalServiceFleet)
 {
     try
     {
         return _rentalServiceFleetRepository.AddRentalServiceFleet(rentalServiceFleet);
     }
     catch (Exception ex)
     {
         ErrorManager.LogApplicationError(ex.StackTrace, ex.Source, ex.Message);
         return 0;
     }
 }
Exemplo n.º 2
0
 public long AddRentalServiceFleet(RentalServiceFleetContract rentalServiceFleet)
 {
     try
     {
         //Re-Map Object to Entity Object
         var myEntityObj = RentalServiceFleetContractMapper.Map<RentalServiceFleetContract, RentalServiceFleet>(rentalServiceFleet);
         if(myEntityObj == null)
         {return -2;}
         var processedRentalServiceFleet =  _repository.Add(myEntityObj);
         _uoWork.SaveChanges();
         return  processedRentalServiceFleet.RentalServiceFleetId;
     }
     catch (Exception ex)
     {
         ErrorManager.LogApplicationError(ex.StackTrace, ex.Source, ex.Message);
         return 0;
     }
 }