Even Anders hangs out on that forum - so you will get help if you ask a question on it. ;-)
Daniel Moth has a good pointer to some LINQ samples you can use:
http://www.danielmoth.com/Blog/2007/08/linq-samples.html One of these LINQ samples is called "DynamicQuery", and it provides a useful library that enables you to write dynamic LINQ expressions that enable you to accomplish what you are after above.
For example, you could write:
var query =
db.Customers.
Where("City = @0 and Orders.Count >= @1", "London", 10).
OrderBy("CompanyName").
Select("new(CompanyName as Name, Phone)");
No comments:
Post a Comment