Exemplo 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, 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();
            });
        }
Exemplo n.º 2
0
        // 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();
            });
        }
Exemplo n.º 3
0
 public CheapPaymentGateway(PaymentProcessContext db)
 {
     _Db = db;
 }
Exemplo n.º 4
0
 public PaymentController(PaymentProcessContext db)
 {
     CheapPayment = new CheapPaymentGateway(db);
 }
 public PaymentRepository(PaymentProcessContext dbContext) : base(dbContext)
 {
 }
Exemplo n.º 6
0
 public EntityRepository(PaymentProcessContext repositoryPatternPaymentContext)
 {
     _repositoryPatternPaymentContext = repositoryPatternPaymentContext;
 }
 public GenericRepository(PaymentProcessContext dbContext)
 {
     _dbContext = dbContext;
 }