コード例 #1
0
ファイル: Startup.cs プロジェクト: zekeriyakoca/RideShare
        // This method gets called by the runtime. Use this method to add services to the container.
        public void ConfigureServices(IServiceCollection services)
        {
            AppServiceSetup.Setup(services, Configuration);
            services.AddControllers().AddNewtonsoftJson();


            services.AddSwaggerGen(c =>
            {
                c.SwaggerDoc("v1", new OpenApiInfo {
                    Title = "AdessoRideShare", Version = "v1"
                });
            });

            services.AddCors(options =>
            {
                options.AddPolicy("myLocal",
                                  policy => policy.AllowAnyOrigin()
                                  .AllowAnyMethod()
                                  .AllowAnyHeader());
            });
        }
コード例 #2
0
 public Startup(IConfiguration configuration)
 {
     this.Configuration = configuration;
     appServiceSetup    = new AppServiceSetup();
 }