コード例 #1
0
        public async Task <IActionResult> Create([Bind("Borrower, Book")] Borrowing borrowing)
        {
            if (ModelState.IsValid)
            {
                await _borrowingService.CreateAsync(borrowing);

                return(RedirectToAction(nameof(Index)));
            }
            return(View(borrowing));
        }