private void UpdateText()
 {
     if (!string.IsNullOrEmpty(AppName))
     {
         RatingMessageTitle   = RatingMessageTitle.Replace("#MyApp#", AppName);
         RatingMessage        = RatingMessage.Replace("#MyApp#", AppName);
         RatingCancelText     = RatingCancelText.Replace("#MyApp#", AppName);
         RatingRemindText     = RatingRemindText.Replace("#MyApp#", AppName);
         RateText             = RateText.Replace("#MyApp#", AppName);
         FeedbackMessageTitle = FeedbackMessageTitle.Replace("#MyApp#", AppName);
         FeedbackMessage      = FeedbackMessage.Replace("#MyApp#", AppName);
         FeedbackCancelText   = FeedbackCancelText.Replace("#MyApp#", AppName);
         FeedbackText         = FeedbackText.Replace("#MyApp#", AppName);
     }
 }
        public void UpdateRatingMessage(RatingMessage entity)
        {
            var ratingRepo      = _repository.GetRepository <RatingMessage>();
            var ratingItemsRepo = _repository.GetRepository <RatingItem>();
            var itemsIds        =
                ratingItemsRepo.Queryable()
                .Where(item => item.RatingMessageId == entity.RatingMessageId)
                .Select(item => item.RatingItemId).ToList();

            itemsIds.ForEach(item => ratingItemsRepo.Delete(item));
            entity.RatingItems.ForEach(item =>
            {
                item.RatingItemId    = 0;
                item.RatingMessageId = entity.RatingMessageId;
            });
            ratingItemsRepo.InsertRange(entity.RatingItems);
            ratingRepo.Update(entity);
        }
 public void InsertRatingMessage(RatingMessage entity)
 {
     _repository.GetRepository <RatingMessage>().Insert(entity);
 }