Example #1
0
        public async Task SeedAsync(PortfolioManagerDbContext context, IHostingEnvironment env, IOptions <AccountSettings> settings, ILogger <AccountContextSeed> logger)
        {
            var policy = CreatePolicy(logger, nameof(AccountContextSeed));

            await policy.ExecuteAsync(async() =>
            {
                using (context)
                {
                    context.Database.Migrate();
                    await context.SaveChangesAsync();
                }
            });
        }
Example #2
0
 public StockRepository(PortfolioManagerDbContext context)
 {
     _context = context;
 }
 public AccountRepository(PortfolioManagerDbContext context)
 {
     _context = context;
 }