public static void Initialize(AccountContext context)
 {
     context.Database.EnsureCreated();
     if (context.Accounts.Any())
     {
         return;
     }
     context.AddRange(
         new Account
     {
         username   = "******",
         password   = "******",
         permission = 0
     }
         );
     context.SaveChanges();
 }
Exemplo n.º 2
0
 public int Complete()
 {
     return(_context.SaveChanges());
 }