diff Agendas/trunk/src/Agendas.Repositories.Tests/Infraestructure/NhHelperTest.cs @ 222:68b09c30b0d2

Separando los test de persistencia en un proyecto aparte
author nelopauselli
date Mon, 19 Sep 2011 18:18:17 -0300
parents Agendas/trunk/src/Agendas.Tests/Cruds/NhHelperTest.cs@5346c0500594
children f23ee59ef1bd
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Agendas/trunk/src/Agendas.Repositories.Tests/Infraestructure/NhHelperTest.cs	Mon Sep 19 18:18:17 2011 -0300
@@ -0,0 +1,16 @@
+using Agendas.NHibernate;
+
+namespace Agendas.Repositories.Tests.Infraestructure
+{
+	public static class NhHelperTest
+	{
+		public static void CleanDb()
+		{
+			var sf = NhHelper.GetSessionFactory();
+
+			var session = sf.OpenStatelessSession();
+			session.CreateSQLQuery("DELETE FROM Evento").ExecuteUpdate();
+			session.CreateSQLQuery("DELETE FROM Persona").ExecuteUpdate();
+		}
+	}
+}
\ No newline at end of file