Mercurial > altnet-hispano
annotate Agendas/trunk/src/Agendas.Tests/Cruds/RequestEmulator.cs @ 138:62791999ad01
Agregando relación entre Evento y Patrocinador
author | nelopauselli |
---|---|
date | Thu, 28 Jul 2011 10:13:28 -0300 |
parents | 2d1adbaf0373 |
children |
rev | line source |
---|---|
137 | 1 using System; |
2 using NHibernate; | |
3 using NHibernate.Context; | |
4 | |
5 namespace AltNetHispano.Agendas.Tests.Cruds | |
6 { | |
7 public class RequestEmulator : IDisposable | |
8 { | |
9 private readonly ISession _session; | |
10 | |
11 public RequestEmulator(ISessionFactory sessionFactory) | |
12 { | |
13 _session = sessionFactory.OpenSession(); | |
14 CurrentSessionContext.Bind(_session); | |
15 } | |
16 | |
17 public void Dispose() | |
18 { | |
19 _session.Flush(); | |
20 _session.Close(); | |
21 } | |
22 } | |
23 } |