public static CMSPage Get(string url) { return(FullPageTable.FirstOrDefault(x => x.URL == url) ?? (GetByType("MainPage").FirstOrDefault() ?? new CMSPage() { URL = "main" })); }
public static string GetPageLinkByType(string typeName) { var type = new DB().PageTypes.FirstOrDefault(x => x.TypeName == typeName); return((type == null ? new CMSPage() { FullUrl = "/" } : (FullPageTable.FirstOrDefault(x => x.Type == type.ID) ?? new CMSPage() { FullUrl = "/" })) .FullUrl); }
public static CMSPage Get(int ID) { return(FullPageTable.FirstOrDefault(x => x.ID == ID) ?? new CMSPage()); }