// 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); }
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); }
private static void InitializeContainer(Container container) { StartupIoC.RegisterIoC(container); }