示例#1
0
        // This method gets called by the runtime. Use this method to add services to the container.
        public IServiceProvider ConfigureServices(IServiceCollection services)
        {
            //   services.AddCors(options =>
            //options.AddPolicy("MyDomain",
            //builder => builder.AllowAnyOrigin().AllowAnyMethod().AllowAnyHeader().AllowAnyOrigin().AllowCredentials()));

            services.AddMvc();
            //配置验证
            auth.ConfigureAuthService(services, Configuration);
            SwaggerConfig.ServicesConfig(services);
            return(IOCRegister.InitIoC(services, Configuration));
        }