public static MenuSectionItem CreateMenuSectionItem(string name, MenuSection menuSection, int?pageId) { if (menuSection.Id == 0) { throw new InvalidOperationException(nameof(menuSection)); } return(new MenuSectionItem() { Name = name, MenuSection = menuSection, PageId = pageId }); }
public static MenuSectionContent CreateMenuSectionContent(string lang, string displayText, MenuSection menuSection) { if (menuSection.Id == 0) { throw new NullReferenceException(nameof(menuSection)); } return(new MenuSectionContent() { Lang = lang, DisplayText = displayText, MenuSection = menuSection }); }