Exemplo n.º 1
0
        // This method gets called by the runtime. Use this method to add services to the container.
        public void ConfigureServices(IServiceCollection services)
        {
            services.AddMvc();

            AutoMapperConfig.RegisterMappings();
            StartupIoC.RegisterIoC(services, Configuration);
        }
Exemplo n.º 2
0
        private static void InitializeContainer(Container container)
        {
            StartupIoC.RegisterIoC(container);

            // Identity
            container.Register <ApplicationDbContext>(Lifestyle.Scoped);
            container.Register <IUserStore <ApplicationUser> >(() => new UserStore <ApplicationUser>(new ApplicationDbContext()), Lifestyle.Scoped);
            container.Register <ApplicationUserManager>(Lifestyle.Scoped);
            container.Register <ApplicationSignInManager>(Lifestyle.Scoped);
        }
Exemplo n.º 3
0
 private static void InitializeContainer(Container container)
 {
     StartupIoC.RegisterIoC(container);
 }