예제 #1
0
 public void UpdateDiyProject(DiyProject diyProject)
 {
     _diyProjectRepository.Update(diyProject);
 }
예제 #2
0
        protected void UpdateLocales(DiyProject diyProject, DiyProjectModel model)
        {
            foreach (var localized in model.Locales)
            {
                _localizedEntityService.SaveLocalizedValue(diyProject,
                                                               x => x.Title,
                                                               localized.Title,
                                                               localized.LanguageId);

                _localizedEntityService.SaveLocalizedValue(diyProject,
                                                          x => x.Short,
                                                          localized.MetaKeywords,
                                                          localized.LanguageId);

                _localizedEntityService.SaveLocalizedValue(diyProject,
                                                          x => x.Full,
                                                          localized.MetaKeywords,
                                                          localized.LanguageId);

                _localizedEntityService.SaveLocalizedValue(diyProject,
                                                           x => x.MetaKeywords,
                                                           localized.MetaKeywords,
                                                           localized.LanguageId);

                _localizedEntityService.SaveLocalizedValue(diyProject,
                                                           x => x.MetaDescription,
                                                           localized.MetaDescription,
                                                           localized.LanguageId);

                _localizedEntityService.SaveLocalizedValue(diyProject,
                                                           x => x.MetaTitle,
                                                           localized.MetaTitle,
                                                           localized.LanguageId);

                _localizedEntityService.SaveLocalizedValue(diyProject,
                                                           x => x.SeName,
                                                           localized.SeName,
                                                           localized.LanguageId);
            }
        }
예제 #3
0
 public void InsertDiyProject(DiyProject diyProject)
 {
     _diyProjectRepository.Insert(diyProject);
 }
예제 #4
0
 public static DiyProject ToEntity(this DiyProjectModel model, DiyProject destination)
 {
     return Mapper.Map(model, destination);
 }