I found an example in the VS2008 Examples for Dynamic LINQ that allows you to use a SQL-like string (e.g. OrderBy("Name, Age DESC")) for ordering. Unfortunately, the method included...
  • April 26, 2022
  • 0 Comments
I’d like to do the equivalent of the following in LINQ, but I can’t figure out how: IEnumerable<Item> items = GetItems(); items.ForEach(i => i.DoStuff()); What is the real syntax?...
  • April 20, 2022
  • 0 Comments
What is the difference between returning IQueryable<T> vs. IEnumerable<T>, when should one be preferred over the other? IQueryable<Customer> custs = from c in db.Customers where c.City == "<City>" select...
  • April 14, 2022
  • 0 Comments