public ActionResult GetData() { using (StudentContext1 context = new StudentContext1()) { var EmployeeData = context.Students.OrderBy(a => a.FirstName).ToList(); return(Json(new { data = EmployeeData }, JsonRequestBehavior.AllowGet)); } }
public StudentsController() { context = new StudentContext1(); }
public HomeController() { context = new StudentContext1(); }