예제 #1
0
        public IViewComponentResult Invoke()
        {
            var model = new AccountHeaderViewModel();

            model.CurrentUser = _userContext.CurrentUser;
            if (model.CurrentUser != null)
            {
                model.NumberOfUnreadMessages = _messageDao.GetNumberOfUnreadMessagesForUser(model.CurrentUser.Id);
            }
            return(View(model));
        }