コード例 #1
0
        public async Task <IActionResult> AddNewBook(Book model)
        {
            var id = await _bookData.AddNewBook(model);

            if (id > 0)
            {
                return(RedirectToAction(nameof(AddNewBook), new { IsSuccess = true, bookId = id }));
            }
            return(View());
        }