view Agendas/trunk/src/Agendas.Repositories.Tests/Infraestructure/NhHelperTest.cs @ 302:11dddcc9a862 tip

Historico de Eventos, no muestra bien la Url del Patrocinador.
author juanjose.montesdeocaarbos
date Tue, 14 Aug 2012 21:54:30 -0300
parents eeca9ddb330a
children
line wrap: on
line source

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 Ponentes").ExecuteUpdate();
			session.CreateSQLQuery("DELETE FROM Patrocinadores").ExecuteUpdate();
			session.CreateSQLQuery("DELETE FROM Evento").ExecuteUpdate();
			session.CreateSQLQuery("DELETE FROM Patrocinador").ExecuteUpdate();
			session.CreateSQLQuery("DELETE FROM Roles").ExecuteUpdate();
			session.CreateSQLQuery("DELETE FROM Persona").ExecuteUpdate();
		}
	}
}