public ActionResult Orders(string id) { var dataContext = new NorthwindDataContext(); var orders = dataContext.Orders.Where(o => o.CustomerID == id); return View(orders.ToList()); }
private IList<string> GetAllCustomers() { var dataContext = new NorthwindDataContext(@"Data Source=.\SQLEXPRESS;Initial Catalog=Northwind;Integrated Security=True"); return dataContext.Customers.Select(c => c.CustomerID).ToList(); }