public static void Initialize(AccountContext context)
 {
     context.Database.EnsureCreated();
     if (context.Accounts.Any())
     {
         return;
     }
     context.AddRange(
         new Account
     {
         username   = "******",
         password   = "******",
         permission = 0
     }
         );
     context.SaveChanges();
 }
Example #2
0
 public UnitOfWorkAccount(AccountContext context)
 {
     Accounts = new AccountRepository(context);
     _context = context;
 }