view Agendas/trunk/src/Agendas.Repositories.NHibernate/RepositoryBase.cs @ 134:a4ef6874ec81

Se termina prueba unitaria que verifica que se cree el evento solo si la acción es Agendar.
author alabra
date Sun, 17 Jul 2011 13:58:31 -0400
parents 963b71ea6028
children a2b14da4902f
line wrap: on
line source

using NHibernate;

namespace AltNetHispano.Agendas.Repositories.NHibernate
{
	public class RepositoryBase<T>
	{
		private readonly ISessionFactory _sessionFactory;

		public RepositoryBase(ISessionFactory sessionFactory)
		{
			_sessionFactory = sessionFactory;
		}

		protected ISession Session { get { return _sessionFactory.GetCurrentSession(); } }

		public void Save(T obj)
		{
			Session.Save(obj);
		}
	}
}