public static SiteSettingsViewModel LoadSiteSettings(WebDataContext context) { var model = new SiteSettingsViewModel { Settings = context.SiteSettings.FirstOrDefault(), RolesList = Roles.GetAllRoles().ToList() }; var configs = context.Configurations; foreach (var config in configs) { model.ConfigSettings.Add(config.Key, config.Value); } return model; }
public static SiteSettingsViewModel LoadSiteSettings(WebDataContext context) { var model = new SiteSettingsViewModel { Settings = context.SiteSettings.FirstOrDefault(), RolesList = Roles.GetAllRoles().ToList() }; var configs = context.Configurations; foreach (var config in configs) { model.ConfigSettings.Add(config.Key, config.Value); } return(model); }
public ActionResult SiteSettings() { var model = new SiteSettingsViewModel(); return View(model); }