//Get: /Data/ //Fetch all projects public ActionResult listProjects() { var data = new List <Project>(); using (TimeRegistrationContext db = new TimeRegistrationContext()) { data = db.Projects.ToList(); } //For Json to work I had to disable Lazy-loading in TimeRegistrationContext return(Json(data, JsonRequestBehavior.AllowGet)); }