public class HomeController : Controller
{
public ActionResult ListJobs()
{
List
GraphEntities db = new GraphEntities();
jobs = db.Jobs.ToList();
return Json(jobs, JsonRequestBehavior.AllowGet);
}
Here is the output
[{"JobID":1,"Job1":"Software Engineer"},{"JobID":2,"Job1":"Junior Programmer"},{"JobID":3,"Job1":"Senior Programmer"},{"JobID":4,"Job1":"Database Administrator"},{"JobID":5,"Job1":"Business Analyst"}]
No comments:
Post a Comment