コード例 #1
0
 public ActionResult ReturnBook(int id, int clientId, DateTime?returnDate)
 {
     if (returnDate == null)
     {
         ModelState.AddModelError("returnDate", "Return Date is Required!");
         return(View("ReturnBookList", _context.BorowedBookList().ToList()));
     }
     _context.ReturnBook(id, clientId, returnDate);
     _context.SaveChanges();
     return(RedirectToAction("ReturnBookList"));
 }