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);

            }
        }
Beispiel #2
0
 public void InsertNewsEx(NewsEx newsEx)
 {
     _diyNewsExRepository.Insert(newsEx);
 }
Beispiel #3
0
 public void UpdateNewsEx(NewsEx newsEx)
 {
     _diyNewsExRepository.Update(newsEx);
 }
Beispiel #4
0
 public void DeleteService(NewsEx newsEx)
 {
     _diyNewsExRepository.Delete(newsEx);
 }
 public static NewsEx ToEntity(this NewsExModel model, NewsEx destination)
 {
     return Mapper.Map(model, destination);
 }