Lambda Expressions and Stored Procedures

Posted by Jason Summers on Stack Overflow See other posts from Stack Overflow or by Jason Summers
Published on 2010-05-18T18:14:10Z Indexed on 2010/05/18 18:30 UTC
Read the original article Hit count: 299

Filed under:
|
|
|

Hi Everyone.

I'm trying to mimic the LINQ Where extension method for my ADO.NET DAL methods.

Bascially, my aim is to have a single method that I can call. Such as:

Product p = Dal.GetProduct(x => x.ProductId == 32);
Product p2 = Dal.GetProduct(x => x.ProductName.Contains("Soap"));

I then want to dissect those Predicates and send the filter options to parameters in an ADO.NET Stored Procedure call.

Any comments greatly appreciated.

© Stack Overflow or respective owner

Related posts about c#

Related posts about lambda