I need help for a dynamic where clause over relational tables (one to many) in LinqToSql.
User select conditions from page. (there is 4 input that u
Check out ScottGu's blog on the dynamic linq library. I think it will help.
Here is an example of a query that hits both the customers and orders table:
var query = db.Customers. Where("City = @0 and Orders.Count >= @1", "London", 10). OrderBy("CompanyName"). Select("new(CompanyName as Name, Phone)");
The query above came from the C# samples for Visual Studio. Download and look in the \LinqSamples\DynamicQuery folder and you will find more examples.