コード例 #1
0
 public static void Disable(string username)
 {
     using (DocCommanderEntities db = new DocCommanderEntities())
     {
         Account acc = AccountRepos.Get(username);
         acc.IsEnabled       = false;
         db.Entry(acc).State = EntityState.Modified;
         db.SaveChanges();
     }
 }
コード例 #2
0
 public static void AddBadLogin(string username)
 {
     using (DocCommanderEntities db = new DocCommanderEntities())
     {
         Account acc = AccountRepos.Get(username);
         acc.NumBadLogins++;
         db.Entry(acc).State = EntityState.Modified;
         db.SaveChanges();
     }
 }