コード例 #1
0
 public ActionResult GetData()
 {
     using (StudentContext1 context = new StudentContext1())
     {
         var EmployeeData = context.Students.OrderBy(a => a.FirstName).ToList();
         return(Json(new { data = EmployeeData }, JsonRequestBehavior.AllowGet));
     }
 }
コード例 #2
0
 public StudentsController()
 {
     context = new StudentContext1();
 }
コード例 #3
0
 public HomeController()
 {
     context = new StudentContext1();
 }