Last active
July 1, 2016 02:55
-
-
Save rexcfnghk/89dcbe60a7b0ffd5f8557159b516359a to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| public class AppNinjectModule : NinjectModule | |
| { | |
| public override void Load() | |
| { | |
| // UserProfileManager is just a factory that manages the life cycle | |
| // of UserProfile, because it has dependencies of its own (e.g. WCF | |
| // service client) | |
| Bind<UserProfile>() | |
| .ToMethod(ctx => ctx.Get<UserProfileManager>().GetUserProfile()) | |
| .InRequestScope(); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment