Esempio n. 1
0
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IWebHostEnvironment env, FantasyCon db)
        {
            app.UseCors(builder => builder
                        .AllowAnyOrigin()
                        .AllowAnyMethod()
                        .AllowAnyHeader());

            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }
            //Swagger
            app.UseSwagger();
            app.UseSwaggerUI(c => {
                c.SwaggerEndpoint("/swagger/v1/swagger.json", "Fantasy League V1");
            });


            app.UseHttpsRedirection();

            app.UseRouting();

            db.Database.EnsureCreated();

            //jwt
            app.UseAuthentication();
            app.UseAuthorization();

            app.UseEndpoints(endpoints =>
            {
                endpoints.MapControllers();
            });
        }
 public LeagueRepository(FantasyCon context)
 {
     this.context = context;
 }
 public RegisterService(FantasyCon context)
 {
     rp = new RegisterRepository(context);
 }
 public TeamsRepository(FantasyCon context)
 {
     this.context = context;
 }
Esempio n. 5
0
 public PlayerService(FantasyCon context)
 {
     rp = new PlayerRepository(context);
 }
 public RegisterController(FantasyCon context, IConfiguration configuration)
 {
     _configuration = configuration;
     rs             = new RegisterService(context);
 }
Esempio n. 7
0
 public TeamsService(FantasyCon context)
 {
     rp = new TeamsRepository(context);
 }
Esempio n. 8
0
 public PointsController(FantasyCon context)
 {
     rs = new PointsService(context);
 }
 public PlayerRepository(FantasyCon context)
 {
     this.context = context;
 }
 public PointsRepository(FantasyCon context)
 {
     this.context = context;
 }
Esempio n. 11
0
 public LeaguesController(FantasyCon context)
 {
     rs = new LeagueService(context);
 }
Esempio n. 12
0
 public LeagueService(FantasyCon context)
 {
     rp = new LeagueRepository(context);
 }
 public PointsService(FantasyCon context)
 {
     rp = new PointsRepository(context);
 }
 public TeamsController(FantasyCon context)
 {
     rs = new TeamsService(context);
 }
Esempio n. 15
0
 public RegisterRepository(FantasyCon context)
 {
     this.context = context;
 }
 public PlayerController(FantasyCon context)
 {
     ps = new PlayerService(context);
 }