Exemplo n.º 1
0
 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;
 }
Exemplo n.º 2
0
        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();
            }
        }