/// <summary> /// Gets the model for the given site. /// </summary> /// <param name="siteid">The site id</param> /// <returns>The model</returns> public static LinkDialogModel GetBySiteId(Guid siteid) { var m = new LinkDialogModel() ; m.ActiveSite = siteid ; using (var db = new DataContext()) { var site = db.SiteTrees.Where(s => s.Id == m.ActiveSite).Single() ; m.Pages = Sitemap.GetStructure(site.InternalId) ; } return m ; }
/// <summary> /// Gets the model for the given site. /// </summary> /// <param name="siteid">The site id</param> /// <returns>The model</returns> public static LinkDialogModel GetBySiteId(Guid siteid) { var m = new LinkDialogModel(); m.ActiveSite = siteid; using (var db = new DataContext()) { var site = db.SiteTrees.Where(s => s.Id == m.ActiveSite).Single(); m.Pages = Sitemap.GetStructure(site.InternalId); } return(m); }