Example #1
0
 public bool DeleteCar(int CarId,CarEntity DeleteCarDetails)
 {
     try
     {
         _unitOfWork.CarRepository.Delete(Mapper.Map<Car>(DeleteCarDetails));
         _unitOfWork.Save();
         return true;
     }
     catch (Exception ex)
     {
         logger.Error(ex);
         return false;
     }
 }
Example #2
0
 public bool CreateCar(CarEntity CarDetails)
 {
     try
     {
         var a = Mapper.Map<Car>(CarDetails);
         _unitOfWork.CarRepository.Insert(a);
         _unitOfWork.Save();
         return true;
     }
     catch (Exception ex)
     {
         logger.Error(ex);
         return false;
     }
 }