CodePaste Logo
New Snippet New Snippet Recent Snippets Recent Snippets My Snippets My Snippets Web Code Search Snippets Search
Sign inor Register
Language: C#

Code Sample

367 Views
Copy Code Show/Hide Line Numbers
   1:  ParameterExpression pc = Expression.Parameter(typeof(Customer), "c");
   2:   
   3:  IQueryable<Customer> q3 =
   4:      dc.Customers.Where<Customer>
   5:      (
   6:          Expression.Lambda<Func<Customer, bool>>
   7:          (
   8:              Expression.Equal(
   9:              Expression.Property(pc, typeof(Customer).GetProperty("City")),
  10:              Expression.Constant("London", typeof(string))
  11:          ), 
  12:          new ParameterExpression[] { pc }
  13:          )
  14:      );
by Ivan Jaimes
  January 19, 2010 @ 8:13pm
Tags:

Add a comment


Report Abuse
brought to you by:
West Wind Techologies



If you find this site useful and use it frequently please consider making a donation to support this free service.
Donate