public CarEmployeeMappingModel GetCarEmployeeMappingById(int carEmployeeMappingId)
 {
     ////unitOfWork.StartTransaction();
     CarEmployeeMappingRepository repo = new CarEmployeeMappingRepository(unitOfWork);
     CarEmployeeMappingModel carEmployeeMappingModel = new CarEmployeeMappingModel();
     CarEmployeeMapping carEmployeeMapping = new CarEmployeeMapping();
     AutoMapper.Mapper.Map(carEmployeeMappingModel, carEmployeeMapping);
     carEmployeeMapping = repo.GetAll().Where(x => x.CarTypeId == carEmployeeMappingId).FirstOrDefault();
        // //unitOfWork.Commit();
     AutoMapper.Mapper.Map(carEmployeeMapping, carEmployeeMappingModel);
     return carEmployeeMappingModel;
 }
 public CarEmployeeMappingModel UpadteCarEmployeeMapping(CarEmployeeMappingModel model)
 {
     ////unitOfWork.StartTransaction();
     CarEmployeeMappingRepository repo = new CarEmployeeMappingRepository(unitOfWork);
     CarEmployeeMapping carEmployeeMapping = new CarEmployeeMapping();
     carEmployeeMapping = repo.GetAll().Where(x => x.EmployeeId == model.EmployeeId).FirstOrDefault();
     AutoMapper.Mapper.Map(model, carEmployeeMapping);
     repo.Update(carEmployeeMapping);
     ////unitOfWork.Commit();
     AutoMapper.Mapper.Map(carEmployeeMapping, model);
     return model;
 }
 public CarEmployeeMappingModel SaveCarEmployeeMapping(CarEmployeeMappingModel model)
 {
     // //unitOfWork.StartTransaction();
     CarEmployeeMappingRepository repo = new CarEmployeeMappingRepository(unitOfWork);
     CarEmployeeMapping carEmployeeMapping = new CarEmployeeMapping();
     AutoMapper.Mapper.Map(model, carEmployeeMapping);
     repo.Insert(carEmployeeMapping);
        // //unitOfWork.Commit();
     AutoMapper.Mapper.Map(carEmployeeMapping, model);
     return model;
 }