Skip to content

Instantly share code, notes, and snippets.

@detroitpro
Created May 31, 2010 18:55
Show Gist options
  • Save detroitpro/420149 to your computer and use it in GitHub Desktop.
Save detroitpro/420149 to your computer and use it in GitHub Desktop.
var query = context.Songs
.WhereIf(request.Artist.IsNotNull(), b => b.Artist == request.Artist)
.WhereIf(request.Genre.IsNotNull(), b => b.Genre == request.Genre)
.WhereIf(request.Title.IsNotNull(), b => b.Title == request.Title)
.WhereIf(request.Label.IsNotNull(), b => b.Label == request.Label);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment