コード例 #1
0
        public async Task <IActionResult> Create([Bind("Id,Title,Description,AuthorId")]  BookService.Models.Book book)
        {
            if (ModelState.IsValid)
            {
                await _booksService.CreateNewBooks(book);

                //_context.Add(book);
                //await _context.SaveChangesAsync();
                return(RedirectToAction(nameof(Index)));
            }
            return(View(book));
        }