Пример #1
0
        public async Task <IViewComponentResult> InvokeAsync()
        {
            var topbarVm = new TopbarViewModel()
            {
            };

            return(View("Default", topbarVm));
        }
Пример #2
0
        public PartialViewResult Topbar(string header)
        {
            var model = new TopbarViewModel
            {
                Header = header,
                User   = UserManager.FindById(User.Identity.GetUserId())
            };

            return(PartialView("_Topbar", model));
        }