Skip to content

Instantly share code, notes, and snippets.

@mcintyre321
Last active December 25, 2015 14:29
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 mcintyre321/6991701 to your computer and use it in GitHub Desktop.
Save mcintyre321/6991701 to your computer and use it in GitHub Desktop.
//inject this into class needing to query data, it can live in the domain
public User delegate FindUserByEmail(string email);
//(over in external DataAccess project)
container.Register<FindUserByEmail>(c => (string email) => c.Resolve<IDocumentSession>().Query<User>().Single(u => u.Email == email));
@mcintyre321
Copy link
Author

Really just a lightweight query object

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment