Mercurial > altnet-hispano
annotate Agendas/trunk/src/Agendas.Repositories.NHibernate/RepositoryBase.cs @ 109:6bd9be78caa0
Merge
author | Nelo@Kenia.neluz.int |
---|---|
date | Tue, 07 Jun 2011 23:21:07 -0300 |
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 } |