// GET: Employee public ActionResult Index() { MyOrgEntities OE = new MyOrgEntities(); var Emps = OE.Employees.ToList(); return(Json(Emps, JsonRequestBehavior.AllowGet)); }
public ActionResult GetByDid(int id) { MyOrgEntities OE = new MyOrgEntities(); var Emps = OE.Employees.Where(x => x.Did == id).ToList(); return(Json(Emps, JsonRequestBehavior.AllowGet)); }
// GET: Departments public ActionResult Index() { MyOrgEntities OE = new MyOrgEntities(); var depts = OE.Departments.ToList(); return(Json(depts, JsonRequestBehavior.AllowGet)); }