public JobServicePictureMappingModel SaveJobServicePictureMapping(JobServicePictureMappingModel model)
 {
     //unitOfWork.StartTransaction();
     JobServicePicturesMappingRepository repo = new JobServicePicturesMappingRepository(unitOfWork);
     JobServicePicturesMapping jobServicePicturesMapping = new JobServicePicturesMapping();
     AutoMapper.Mapper.Map(model, jobServicePicturesMapping);
     repo.Insert(jobServicePicturesMapping);
     //unitOfWork.Commit();
     AutoMapper.Mapper.Map(jobServicePicturesMapping, model);
     return model;
 }
 public JobServicePictureMappingModel GetJobServicePictureMappingById(int id)
 {
     //unitOfWork.StartTransaction();
     JobServicePicturesMappingRepository repo = new JobServicePicturesMappingRepository(unitOfWork);
     JobServicePictureMappingModel jobServicePictureMappingModel = new JobServicePictureMappingModel();
     JobServicePicturesMapping jobServicePicturesMapping = new JobServicePicturesMapping();
     AutoMapper.Mapper.Map(jobServicePictureMappingModel, jobServicePicturesMapping);
     jobServicePicturesMapping = repo.GetAll().Where(x => x.Id == id).FirstOrDefault();
     //unitOfWork.Commit();
     AutoMapper.Mapper.Map(jobServicePicturesMapping, jobServicePictureMappingModel);
     return jobServicePictureMappingModel;
 }
 public JobServicePictureMappingModel UpadteJobServiceMapping(JobServicePictureMappingModel model)
 {
     //unitOfWork.StartTransaction();
     JobServicePicturesMappingRepository repo = new JobServicePicturesMappingRepository(unitOfWork);
     JobServicePicturesMapping jobServicePicturesMapping = new JobServicePicturesMapping();
     jobServicePicturesMapping = repo.GetAll().Where(x => x.Id == model.Id).FirstOrDefault();
     AutoMapper.Mapper.Map(model, jobServicePicturesMapping);
     repo.Update(jobServicePicturesMapping);
     //unitOfWork.Commit();
     AutoMapper.Mapper.Map(jobServicePicturesMapping, model);
     return model;
 }