// GET: Student/Edit/5 public ActionResult Edit(int id) { StudentDB objDB = new StudentDB(); var student = objDB.GetDetail().Where(i => i.Id == id).FirstOrDefault(); return(View(student)); }
//[Microsoft.AspNetCore.Mvc.HttpGet] // GET: Default public IEnumerable <Student> GetStudents() { // GET: api/Student List <Student> students = objDB.GetDetail(); return(students); }
public ActionResult SingleDetail() { StudentDB objDB = new StudentDB(); var students = objDB.GetDetail().OrderBy(i => i.Id); return(View(students)); }