comparison Agendas/trunk/src/Agendas.Repositories.NHibernate/RepositoryBase.cs @ 63:963b71ea6028

Repositorios con NH
author nelopauselli
date Tue, 17 May 2011 14:02:25 -0300
parents
children a2b14da4902f
comparison
equal deleted inserted replaced
62:c40b97bbed01 63:963b71ea6028
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 }