// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IWebHostEnvironment env, AthlosDbContext dbContext) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } app.UseHttpsRedirection(); app.UseRouting(); app.UseAuthorization(); app.UseEndpoints(endpoints => { endpoints.MapControllers(); }); app.UseSwagger(); app.UseSwaggerUI(c => { c.SwaggerEndpoint("/swagger/v1/swagger.json", "Athlos API V1"); }); app.UseKledex().EnsureDomainDbCreated(); //dbContext.Database.EnsureDeleted(); dbContext.Database.EnsureCreated(); }
public GetAthleteHandler(AthlosDbContext db) { _db = db; }
public GetTrainingPlansForAthleteHandler(AthlosDbContext db) { _db = db; }
public AthleteRegisteredHandler(AthlosDbContext db) { _db = db; }
public TrainingPlanCreatedHandler(AthlosDbContext db) { _db = db; }