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)
 {
     AppLoader.LoadConfiguration_AllowCros(ref services);
     services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1);
     services.AddScoped <Filter.Filter_TokenVerify>();
     services.AddScoped <Filter.Filter_ConnectDB>();
     services.AddScoped <Filter.Filter_InitServices>();
 }
Exemplo n.º 2
0
 // This method gets called by the runtime. Use this method to add services to the container.
 public void ConfigureServices(IServiceCollection services)
 {
     services.AddSession(o =>
     {
         o.IdleTimeout = TimeSpan.FromHours(4);
     });
     AppLoader.LoadConfiguration_AllowCros(ref services);
     services.AddDistributedMemoryCache();
     services.AddMvc();
     services.AddScoped <Filter.Filter_UserAuthrization>();
     services.AddScoped <Filter.Filter_InitServices>();
     services.AddScoped <Filter.Filter_ConnectDB>();
 }