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