public static async Task <int> Main(string[] args)
        {
            try
            {
                IHost host = CreateHostBuilder(args).Build();

                using IServiceScope serviceScope = host.Services.CreateScope();

                IServiceProvider services = serviceScope.ServiceProvider;

                GeneralStockMarketDbContext dbContext = services.GetRequiredService <GeneralStockMarketDbContext>();

                dbContext.Database.Migrate();

                await Seeder.CreateAccountingWallet(services);

                Log.Information("Starting host...");
                await host.RunAsync();

                return(0);
            }
            catch (Exception ex)
            {
                Log.Fatal(ex, "Host terminated unexpectedly.");
                return(1);
            }
            finally
            {
                Log.CloseAndFlush();
            }
        }
 public EfProductItemRepository(GeneralStockMarketDbContext dbContext)
 {
     this.dbContext = dbContext;
 }
 public EfProductDepositRequestRepository(GeneralStockMarketDbContext dbContext)
 {
     this.dbContext = dbContext;
 }
Esempio n. 4
0
 public EfTransactionRepository(GeneralStockMarketDbContext dbContext)
 {
     this.dbContext = dbContext;
 }
Esempio n. 5
0
 public EfWalletRepository(GeneralStockMarketDbContext dbContext)
 {
     this.dbContext = dbContext;
 }
 public EfLimitOptionRequestRepository(GeneralStockMarketDbContext dbContext)
 {
     this.dbContext = dbContext;
 }