view Agendas/trunk/src/Agendas.Tests/Cruds/RequestEmulator.cs @ 202:a731086c0b28

Se soluciona ticket 174. Además se agrega detalle del campo Hora y Duración cuando son obligatorios en Resources.
author alabra
date Sat, 20 Aug 2011 18:40:36 -0400
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();
		}
	}
}