コード例 #1
0
        public static DependencyControllerRouter Get()
        {
            var router = new DependencyControllerRouter();

            var container = router.Container;

            container.Register <IUserService, UserService>();
            container.Register <IGameService, GameService>();
            container.Register <GameStoreDbContext>(Lifestyle.Scoped);

            container.Verify();

            return(router);
        }
コード例 #2
0
        public static DependencyControllerRouter Initilialize()
        {
            DependencyControllerRouter router = new DependencyControllerRouter();

            Container container = router.Container;

            container.Register <IUserService, UserService>();
            container.Register <IGameService, GameService>();
            container.Register <IShoppingService, ShoppingService>();
            container.Register <GameStoreDbContext>(Lifestyle.Scoped);

            container.Verify();

            return(router);
        }