public BankAccountController(WebWalletContext context, UserManager <ApplicationUser> userManager, SignInManager <ApplicationUser> signInManager, IEmailSender emailSender, ILogger <AccountController> logger) { _context = context; _userManager = userManager; _userManager = userManager; _signInManager = signInManager; _emailSender = emailSender; _logger = logger; }
public static void Initialize(IServiceProvider serviceProvider) { using (var context = new WebWalletContext( serviceProvider.GetRequiredService <DbContextOptions <WebWalletContext> >())) { // Look for any bank accounts. //if (context.BankAccount.Any()) //{ // return; // DB has been seeded //} context.SaveChanges(); } }