public void UpdateDiyProject(DiyProject diyProject) { _diyProjectRepository.Update(diyProject); }
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); } }
public void InsertDiyProject(DiyProject diyProject) { _diyProjectRepository.Insert(diyProject); }
public static DiyProject ToEntity(this DiyProjectModel model, DiyProject destination) { return Mapper.Map(model, destination); }