public ActionResult Menu() { int messageCount = Request.IsAuthenticated ? _messageServices.GetUnreadMessages(_currentUser.UserID).Count() : 0; ViewData["NewMessagesCount"] = messageCount; return(View("_Menu")); }
public ActionResult Header() { HeaderViewModel model = new HeaderViewModel() { CurrentUser = _currentUser, NewMessagesCount = Request.IsAuthenticated ? _messageServices.GetUnreadMessages(_currentUser.UserID).Count() : 0, IsAdministrator = Request.IsAuthenticated ? _roleServices.UserHasSpecialPermissions(_currentUser.UserID, SpecialPermissionValue.Administrator) : false }; return(View("_Header", model)); }