Пример #1
0
        protected void UpdateLocales(NewsEx @newsEx, NewsExModel model)
        {
            foreach (var localized in model.Locales)
            {
                _localizedEntityService.SaveLocalizedValue(@newsEx,
                                                               x => x.Title,
                                                               localized.Title,
                                                               localized.LanguageId);
                _localizedEntityService.SaveLocalizedValue(@newsEx,
                                                               x => x.Full,
                                                               localized.Full,
                                                               localized.LanguageId);

            }
        }
Пример #2
0
 public void InsertNewsEx(NewsEx newsEx)
 {
     _diyNewsExRepository.Insert(newsEx);
 }
Пример #3
0
 public void UpdateNewsEx(NewsEx newsEx)
 {
     _diyNewsExRepository.Update(newsEx);
 }
Пример #4
0
 public void DeleteService(NewsEx newsEx)
 {
     _diyNewsExRepository.Delete(newsEx);
 }
Пример #5
-1
 public static NewsEx ToEntity(this NewsExModel model, NewsEx destination)
 {
     return Mapper.Map(model, destination);
 }