示例#1
0
 public int AddModelEdition(ModelEditionContract modelEdition)
 {
     try
     {
         return _modelEditionRepository.AddModelEdition(modelEdition);
     }
     catch (Exception ex)
     {
         ErrorManager.LogApplicationError(ex.StackTrace, ex.Source, ex.Message);
         return 0;
     }
 }
示例#2
0
 public int AddModelEdition(ModelEditionContract modelEdition)
 {
     try
     {
         //Re-Map Object to Entity Object
         var myEntityObj = ModelEditionContractMapper.Map<ModelEditionContract, ModelEdition>(modelEdition);
         if(myEntityObj == null)
         {return -2;}
         var processedModelEdition =  _repository.Add(myEntityObj);
         _uoWork.SaveChanges();
         return  processedModelEdition.ModelEditionId;
     }
     catch (Exception ex)
     {
         ErrorManager.LogApplicationError(ex.StackTrace, ex.Source, ex.Message);
         return 0;
     }
 }
示例#3
0
 public bool UpdateModelEdition(ModelEditionContract modelEdition)
 {
     try
     {
         return _modelEditionRepository.UpdateModelEdition(modelEdition);
         }
     catch (Exception ex)
     {
         ErrorManager.LogApplicationError(ex.StackTrace, ex.Source, ex.Message);
         return false;
     }
 }