NorthwindEntities db = new NorthwindEntities();
var customers = from c in db.Customers
select new
{
c.CustomerID,
c.CompanyName
};
SelectList customersList = new SelectList(customers.Take(10), "CustomerID", "CompanyName");
ViewData["DdlCustomers"] = customersList;
Showing posts with label sql. Show all posts
Showing posts with label sql. Show all posts
Thursday, October 21, 2010
populate SelectList with linq to sql results
Tuesday, July 27, 2010
Subscribe to:
Posts (Atom)