Mercurial > altnet-hispano
annotate Agendas/trunk/src/Agendas.Repositories.Tests/Infraestructure/RequestEmulator.cs @ 302:11dddcc9a862 tip
Historico de Eventos, no muestra bien la Url del Patrocinador.
author | juanjose.montesdeocaarbos |
---|---|
date | Tue, 14 Aug 2012 21:54:30 -0300 |
parents | 68b09c30b0d2 |
children |
rev | line source |
---|---|
137 | 1 using System; |
2 using NHibernate; | |
3 using NHibernate.Context; | |
4 | |
222
68b09c30b0d2
Separando los test de persistencia en un proyecto aparte
nelopauselli
parents:
137
diff
changeset
|
5 namespace Agendas.Repositories.Tests.Infraestructure |
137 | 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 } |