Example #1
0
        public async Task <IViewComponentResult> InvokeAsync(Guid pageId)
        {
            var bookmark = await _bookmarks.GetForCurrentUserAsync(pageId);

            var model = new ToggleBookmarkViewModel
            {
                PageId         = pageId,
                BookmarkExists = bookmark != null
            };

            return(View(model));
        }