view Agendas/trunk/src/Agendas.Tests/Cruds/RequestEmulator.cs @ 161:c1062de96845

Al publicar una agenda el nroOrden debe ser mayor a cero y urlWiki no vacio.
author juanjose.montesdeocaarbos
date Fri, 05 Aug 2011 21:54:43 -0300
parents 2d1adbaf0373
children
line wrap: on
line source

using System;
using NHibernate;
using NHibernate.Context;

namespace AltNetHispano.Agendas.Tests.Cruds
{
	public class RequestEmulator : IDisposable
	{
		private readonly ISession _session;

		public RequestEmulator(ISessionFactory sessionFactory)
		{
			_session = sessionFactory.OpenSession();
			CurrentSessionContext.Bind(_session);
		}

		public void Dispose()
		{
			_session.Flush();
			_session.Close();
		}
	}
}