Bored with writing the simplest example of connecting MVC4 + Highcharts to a database, mvc4highcharts
After a database is messed up, the INT type is not specified and the ID is directly displayed as the data.
:
Front end
1 @ {2 Layout = null; 3} 4 5 <! DOCTYPE html> 6 7 Background
1 using System; 2 using System. collections. generic; 3 using System. linq; 4 using System. web; 5 using System. web. mvc; 6 using table. models; 7 8 namespace table. controllers 9 {10 public class HomeController: Controller11 {12 // 13 // GET:/Home/14 columnprictureEntities db = new columnprictureEntities (); 15 public ActionResult Index () 16 {17 return View (); 18} 19 public ActionResult se () 20 {21 22 23 24 var d = (from B in db. prc select B ). toList (); 25 List <Models. prc> bb = (from dd in db. prc select dd ). toList (); 26 return Json (d, JsonRequestBehavior. allowGet); 27} 28 29} 30}View Code