Exemple #1
0
 // This method gets called by the runtime. Use this method to add services to the container.
 public void ConfigureServices(IServiceCollection services)
 {
     CorsConfig.Add_CorsConfig_Service(services);
     services.AddMvc();
     services.AddSingleton <ReponseIdentityServer>();
     services.AddPaging();
     SwaggerConfig.Add_SwaggerConfigService(services);
     ConfigRepositoryService.configReponsitory(services);
 }
        public void ConfigureServices(IServiceCollection services)
        {
            CorsConfig.Add_CorsConfig_Service(services);
            //var cors = new DefaultCorsPolicyService(_logger)
            //{
            //    AllowAll = true,

            //};
            string connectionString = Configuration.GetConnectionString("DefaultConnection");

            ConfigIdentity.Add_Identity_Service(services, connectionString);
            ConfigJWT.Add_ConfigJWTService(services, Configuration);
            services.AddMvc();
            SwaggerConfig.Add_SwaggerConfigService(services);
            ConfigRepositoryService.configReponsitory(services);
        }