public ActionResult Create(FormCollection collection) { try { // TODO: Add insert logic here Models.BorrowFormModel borrowFormModel = new Models.BorrowFormModel(); UpdateModel(borrowFormModel); borrowFormRepository.InsertBorrowForm(borrowFormModel); bookRepository.DeductBook(borrowFormModel.IDBook); return(RedirectToAction("Index")); } catch { return(View("CreateBorrowForm")); } }