Last active
December 25, 2015 14:29
-
-
Save mcintyre321/6991701 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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)); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Really just a lightweight query object