public static void Delete_User_Create_In_Feature() { TestRunHelper.Session.BeginTransaction(); var repo = new AccountRepository(TestRunHelper.Session); var users = repo.GetBy(x => x.UserName == "someuser"); if (users != null) { foreach (var user in users) { repo.Delete(user); } } TestRunHelper.Session.Transaction.Commit(); }