Mercurial > altnet-hispano
annotate 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 |
rev | line source |
---|---|
63 | 1 using NHibernate; |
2 | |
3 namespace AltNetHispano.Agendas.Repositories.NHibernate | |
4 { | |
5 public class RepositoryBase<T> | |
6 { | |
7 private readonly ISessionFactory _sessionFactory; | |
8 | |
9 public RepositoryBase(ISessionFactory sessionFactory) | |
10 { | |
11 _sessionFactory = sessionFactory; | |
12 } | |
13 | |
14 protected ISession Session { get { return _sessionFactory.GetCurrentSession(); } } | |
15 | |
16 public void Save(T obj) | |
17 { | |
18 Session.Save(obj); | |
19 } | |
20 } | |
21 } |