public ActionResult Edit([Bind(Include = "ID,Name,Password")] Models.Main main) { if (ModelState.IsValid) { db.Entry(main).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(main)); }
public ActionResult Edit([Bind(Include = "ID,Subject,Remark,Day,Date,Assignment,Time,Recitation,Comment,Quiz,Seatwork,Midterm,Final")] Log log) { if (ModelState.IsValid) { db.Entry(log).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(log)); }