protected override void OnActionExecuting(ActionExecutingContext filterContext) { if (User.Identity.IsAuthenticated) { var dc = new DataClassesDataContext(); loggedUser = dc.UserProfiles.FirstOrDefault(d => d.UserName.ToLower() == User.Identity.Name.ToLower()); ViewBag.MenuSections = sectionRpstry.GetMenuSections(loggedUser.UserId); } base.OnActionExecuting(filterContext); }