Beispiel #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, PaperTradeAPIContext context)
        {
            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }

            app.UseHttpsRedirection();

            app.UseRouting();

            app.UseAuthorization();

            app.UseEndpoints(endpoints =>
            {
                endpoints.MapControllers();
            });

            if (!context.User.Any())
            {
                context.User.Add(new Models.User
                {
                    Email    = "*****@*****.**",
                    Password = "******"
                });
            }
            context.SaveChanges();
        }
Beispiel #2
0
 public WalletsController(PaperTradeAPIContext context)
 {
     _context = context;
 }
Beispiel #3
0
 public TransactionsController(PaperTradeAPIContext context)
 {
     _context = context;
 }
Beispiel #4
0
 public UsersController(PaperTradeAPIContext context)
 {
     _context = context;
 }