public static Branch ToEntity(this BranchModel model, Branch destination) { return Mapper.Map(model, destination); }
public void UpdateBranch(Branch branch) { _branchRepository.Update(branch); }
protected void UpdateLocales(Branch branch, BranchModel model) { foreach (var localized in model.Locales) { _localizedEntityService.SaveLocalizedValue(branch, x => x.Title, localized.Title, localized.LanguageId); _localizedEntityService.SaveLocalizedValue(branch, x => x.Short, localized.MetaKeywords, localized.LanguageId); _localizedEntityService.SaveLocalizedValue(branch, x => x.Full, localized.MetaKeywords, localized.LanguageId); _localizedEntityService.SaveLocalizedValue(branch, x => x.MetaKeywords, localized.MetaKeywords, localized.LanguageId); _localizedEntityService.SaveLocalizedValue(branch, x => x.MetaDescription, localized.MetaDescription, localized.LanguageId); _localizedEntityService.SaveLocalizedValue(branch, x => x.MetaTitle, localized.MetaTitle, localized.LanguageId); _localizedEntityService.SaveLocalizedValue(branch, x => x.SeName, localized.SeName, localized.LanguageId); } }
public void InsertBranch(Branch branch) { _branchRepository.Insert(branch); }