// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IWebHostEnvironment env, FormulaDbContext db, IAuthService authService) { // Register the exception handling middleware app.UseMiddleware <ErrorHandlerMiddleware>(); // Create the database tables if they haven't been created yet. db.Database.EnsureCreated(); app.UseHttpsRedirection(); app.UseCors(); app.UseRouting(); app.UseAuthentication(); app.UseAuthorization(); // Register test user authService.Register(new ViewModels.Models.UserViewModel { UserName = "******", Password = "******" }); app.UseEndpoints(endpoints => { endpoints.MapControllers(); }); }
public TeamRepository(FormulaDbContext db) : base(db) { }
public Repository(FormulaDbContext db) { this._dbContext = db; }