BgEngine.Controllers.PostController.GetPostById C# (CSharp) Method

GetPostById() private method

private GetPostById ( int id ) : System.Web.Mvc.ActionResult
id int
return System.Web.Mvc.ActionResult
        public ActionResult GetPostById(int id)
        {
            Post post = BlogServices.FindPost(id);
            if (post == null)
            {
                return new NotFoundMvc.NotFoundViewResult();
            }
            ViewBag.MetaDescription = post.Description;
            if ((post.IsPublic) || (CodeFirstRoleServices.IsUserInRole(CodeFirstSecurity.IsAuthenticated ? CodeFirstSecurity.CurrentUserName : " ", BgResources.Security_PremiumRole)))
            {
                return View("Post", post);
            }
            else
            {
                TempData["returnUrl"] = Request.Url.ToString();
                return RedirectToRoute("Default", new { controller = "Account", action = "LogOn"});
            }
        }