Esempio n. 1
0
        // This method gets called by the runtime. Use this method to add services to the container.
        public void ConfigureServices(IServiceCollection services)
        {
            var connectionString = Configuration.GetConnectionString("mssql");

            DIConfigurator.ConfigureServices(services, connectionString);
            services.AddSingleton <IUserStore <User>, UserStore>();
            services.AddSingleton <IRoleStore <Role>, RoleStore>();
            services.AddSingleton <IFileService, FileService>();
            services.AddIdentity <User, Role>().AddDefaultTokenProviders();
            services.AddControllersWithViews();
        }