I saw some examples of using EF generic reposity. I do not have a very firm grip on LINQ so I am not able to understand how to use this method. Can you plese guide me ? Here is my code. I am not gettign how I will pass a expression to it. Will highly appriciate if you please can guide with examples.
public IEnumerable<T> Query(Expression<Func<T, bool>> filter)
{
return objectSet.Where(filter);
}
Thanks
You can use this in the same way you would use a linq where method.
For example if T was a User, with a Name property you could do
this type of expression is called a lambda expression. For more details you can take a look at http://msdn.microsoft.com/en-us/library/bb397687.aspx