public ActionResult ConfirmBorrow(int id) { Borrow b = new Borrow(); b.Book = id; b.Borrower = Convert.ToInt32(Session["uid"]); DateTime today = DateTime.Now; b.Bdate = today; b.Edate = today.AddDays(7); b.Status = 0; bservice.Insert(b); Book bk = service.Get(id); bk.Copy = bk.Copy - 1; service.Update(bk); return(RedirectToAction("Index")); }