// UPDATE (load base view) // GET: /Student/Edit/5 public ActionResult Edit(int id) { ViewBag.Title = "Edit Student detail"; StudentDBHandle dbhandle = new StudentDBHandle(); return(View(dbhandle.ReadStudent().Find(smodel => smodel.Id == id))); }
// READ ALL // GET: /Student/ public ActionResult Index() { ViewBag.Title = "Create <new Student> | edit | view detail | delete <Student>"; StudentDBHandle dbhandle = new StudentDBHandle(); ModelState.Clear(); return(View(dbhandle.ReadStudent())); }