我想从表bookinfo
的字段available
中减去“1”
[HttpPost]
public ActionResult issuebook(string type, string accessionno, string bookname, string issuedate, string duedate, string id)
{
tblIssuedbook issuebook = new tblIssuedbook();
issuebook.AccessionNo = accessionno;
issuebook.Name = bookname;
issuebook.IssueDate = issuedate;
issuebook.DueDate = duedate;
issuebook.Type = type;
issuebook.MemberId = id;
db.tblIssuedbooks.Add(issuebook);
db.SaveChanges();
Bookinfo b = new Bookinfo();
return view();
}
我希望这些字段保存在数据库中,根据accessionNo