Created
August 28, 2010 14:34
-
-
Save kmckelvin/555195 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 MusicStoreNinjectModule : NinjectModule | |
| { | |
| public override void Load() | |
| { | |
| Bind<AccountController>().ToSelf(); | |
| Bind<CheckoutController>().ToSelf(); | |
| Bind<HomeController>().ToSelf(); | |
| Bind<ShoppingCartController>().ToSelf(); | |
| Bind<StoreController>().ToSelf(); | |
| Bind<StoreManagerController>().ToSelf(); | |
| // This will be injected into our controller to give us access to our context | |
| // without introducing a tight coupling to a static resource. | |
| Bind<IMusicStoreContext>().ToMethod(c => MvcApplication.GetCurrentRequestContext()); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment