public void DeleteServiceProviderServiceMapping(int Id)
        {
            //unitOfWork.StartTransaction();
            ServiceProviderServiceMappingModel model = new ServiceProviderServiceMappingModel();
            ServiceProviderServiceMappingRepository repo = new ServiceProviderServiceMappingRepository(unitOfWork);
            ServiceProviderServiceMapping serviceProviderServiceMappingModel = new ServiceProviderServiceMapping();

            repo.Delete(x => x.Id == Id);
            //unitOfWork.Commit();
        }
        public bool FindServiceByServiceId(int Id,string serviceproviderId)
        {
            //unitOfWork.StartTransaction();
            ServiceProviderServiceMappingModel model = new ServiceProviderServiceMappingModel();
            ServiceProviderServiceMappingRepository repo = new ServiceProviderServiceMappingRepository(unitOfWork);
               ServiceProviderServiceMapping serviceProviderServiceMappingModel = new ServiceProviderServiceMapping();

            serviceProviderServiceMappingModel = repo.GetAll().Where(x => x.ServiceId == Id && x.ServiceProviderId== serviceproviderId).FirstOrDefault();
            //unitOfWork.Commit();
            //AutoMapper.Mapper.Map(serviceProviderServiceMappingModel, model);
            if (serviceProviderServiceMappingModel == null)
            {
                return false;
            }
            else
            {
                return true;
            }
        }
 public ServiceProviderServiceMappingModel UpadteServicesForServiceProvider(ServiceProviderServiceMappingModel model)
 {
     //unitOfWork.StartTransaction();
     ServiceProviderServiceMappingRepository repo = new ServiceProviderServiceMappingRepository(unitOfWork);
     ServiceProviderServiceMapping serviceProviderServiceMappingModel = new ServiceProviderServiceMapping();
     serviceProviderServiceMappingModel = repo.GetAll().Where(x => x.ServiceProviderId == model.ServiceProviderId).SingleOrDefault();
     AutoMapper.Mapper.Map(model, serviceProviderServiceMappingModel);
     repo.Update(serviceProviderServiceMappingModel);
     //unitOfWork.Commit();
     AutoMapper.Mapper.Map(serviceProviderServiceMappingModel, model);
     return model;
 }
 public ServiceProviderServiceMappingModel InsertServicesForServiceProvider(ServiceProviderServiceMappingModel model)
 {
     //unitOfWork.StartTransaction();
     ServiceProviderServiceMappingRepository repo = new ServiceProviderServiceMappingRepository(unitOfWork);
     ServiceProviderServiceMapping serviceProviderServiceMappingModel = new ServiceProviderServiceMapping();
     AutoMapper.Mapper.Map(model, serviceProviderServiceMappingModel);
     repo.Insert(serviceProviderServiceMappingModel);
     //unitOfWork.Commit();
     AutoMapper.Mapper.Map(serviceProviderServiceMappingModel, model);
     return model;
 }