Exemplo n.º 1
0
        public static PageItem GetPageByFriendlyUrl(string friendlyUrl)
        {
            NESTV1Entities db = new NESTV1Entities();

            PageItem page = null;

            ContentBody contentbody = db.ContentBodies.Single(c => c.SEOUrl == friendlyUrl);

            page                = new PageItem();
            page.PageId         = (int)contentbody.Id;
            page.ControllerName = "Contribute";
            page.FriendlyUrl    = contentbody.SEOUrl;


            return(page);
        }