Example #1
0
        public async Task <IActionResult> AddBookToFavorites(int bookId)
        {
            var userId = this.userManager.GetUserId(this.User);

            await booksService.AddToFavorites(userId, bookId);

            return(RedirectToAction("Details", "Books", new { bookId = bookId }));
        }