Skip to content

Instantly share code, notes, and snippets.

@carolynvs
Created December 11, 2012 02:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save carolynvs/4255487 to your computer and use it in GitHub Desktop.
Save carolynvs/4255487 to your computer and use it in GitHub Desktop.
Using Generic Methods in Entity Framework Queries
public static IQueryable<T> FilterByFooBar<T>(this IQueryable<T> items)
where T : class, IFooBar
{
return items.Where(x => x.IsFooBar);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment