Exemple #1
0
 public void DeleteAllAccounts()
 {
     DBCleaner
     .OnServer("MyServerName")
     .InDatabase("MyDatabase")
     .UsingTrustedConnection()
     .InTable("Account")
     .TruncateTable();
 }
Exemple #2
0
 public void DeleteAccountsThatHaveNotLoggedInForOneYear()
 {
     DBCleaner
     .OnServer("(local)")
     .InDatabase("MyDatabase")
     .UsingUserNamed("MyUserId")
     .WithPasswordOf("MyUserPassword")
     .InTable("Account")
     .DeleteRowsWhereColumn("LastLoginDate")
     .IsLessThan(DateTime.UtcNow.AddYears(-1));
 }