Mercurial > altnet-hispano
diff Agendas/trunk/src/Agendas.Tests/Cruds/NhHelperTest.cs @ 200:5346c0500594 deploy pre 1.0
Pasando a estructura de db fija, ya no se crea automáticamente.
Se comenta lo referente a Patrocinadores que queda para alguna futura versión.
Script para tablas de v1.0
author | nelopauselli |
---|---|
date | Wed, 17 Aug 2011 17:54:45 -0300 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Agendas/trunk/src/Agendas.Tests/Cruds/NhHelperTest.cs Wed Aug 17 17:54:45 2011 -0300 @@ -0,0 +1,16 @@ +using Agendas.NHibernate; + +namespace AltNetHispano.Agendas.Tests.Cruds +{ + 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