public ClientRatingModel GetClientRatingByJobId(int JobId)
 {
     //unitOfWork.StartTransaction();
     ClientRatingRepository repo = new ClientRatingRepository(unitOfWork);
     ClientRatingModel ratingModel = new ClientRatingModel();
     ClientRating rating = new ClientRating();
     AutoMapper.Mapper.Map(ratingModel, rating);
     rating = repo.GetAll().Where(x => x.JobId == JobId).FirstOrDefault();
     //unitOfWork.Commit();
     AutoMapper.Mapper.Map(rating, ratingModel);
     return ratingModel;
 }
 public ClientRatingModel SaveClientRating(ClientRatingModel model)
 {
     //unitOfWork.StartTransaction();
     ClientRatingRepository repo = new ClientRatingRepository(unitOfWork);
     ClientRating rating = new ClientRating();
     AutoMapper.Mapper.Map(model, rating);
     repo.Insert(rating);
     //unitOfWork.Commit();
     AutoMapper.Mapper.Map(rating, model);
     return model;
 }
 public ClientRatingModel UpadteClientRating(ClientRatingModel model)
 {
     //unitOfWork.StartTransaction();
     ClientRatingRepository repo = new ClientRatingRepository(unitOfWork);
     ClientRating rating = new ClientRating();
     rating = repo.GetAll().Where(x => x.ClientRatingId == model.ClientRatingId).FirstOrDefault();
     AutoMapper.Mapper.Map(model, rating);
     repo.Update(rating);
     //unitOfWork.Commit();
     AutoMapper.Mapper.Map(rating, model);
     return model;
 }