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(); } }
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(); } }