Wednesday, April 11, 2012

How to use predicate search with linq2sql

We are using Linq2SQL with MS SQL as an ORM on our new project. I have never used linq2sql before, so my question can be a bit dumb. I want to have a method that will perform a search for entities in DB by predicate, smth like this:

public IEnumerable<T> Get<T>(Expression<Func<T, bool>> @where)

could you give some advices where I can see some code samlpes or ideas how to implement this?

No comments:

Post a Comment