Trying to create a client side array for js:
var ds = [{ text: "john", value: "1" }, { text: "paul", value: "2" }];
In my asp.net mvc 3 controller, I created an entityframework model and tried to return a list:
NORTHWNDEntities db = new NORTHWNDEntities(); public ActionResult GetCustomers() { return Json( db.Customers,JsonRequestBehavior.AllowGet); }
at the moment I can’t figure out how to return the customername + customerid property to the customer list (NWind database)?
source share