// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IWebHostEnvironment env, PaymentProcessContext db) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } db.Database.EnsureCreated();//Auto Create Database app.UseSwagger(); app.UseSwaggerUI(c => { c.SwaggerEndpoint("v1/swagger.json", "Payment Api .NETCore Api 3.1"); }); app.UseRouting(); app.UseAuthorization(); app.UseEndpoints(endpoints => { endpoints.MapControllers(); }); }
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IWebHostEnvironment env, PaymentProcessContext db) { app.UseMiddleware <ExceptionMiddleware>(); //if (env.IsDevelopment()) //{ // app.UseDeveloperExceptionPage(); //} db.Database.EnsureCreated(); app.UseHttpsRedirection(); app.UseRouting(); app.UseAuthorization(); app.UseEndpoints(endpoints => { endpoints.MapControllers(); }); }
public CheapPaymentGateway(PaymentProcessContext db) { _Db = db; }
public PaymentController(PaymentProcessContext db) { CheapPayment = new CheapPaymentGateway(db); }
public PaymentRepository(PaymentProcessContext dbContext) : base(dbContext) { }
public EntityRepository(PaymentProcessContext repositoryPatternPaymentContext) { _repositoryPatternPaymentContext = repositoryPatternPaymentContext; }
public GenericRepository(PaymentProcessContext dbContext) { _dbContext = dbContext; }