コード例 #1
0
        public async Task <IActionResult> Return(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }
            var borrowing = await _borrowingService.GetAsync(id.Value);

            await _borrowingService.EndBorrowing(borrowing);

            await _bookService.EndBorrowing(borrowing);

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