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