Mercurial > altnet-hispano
comparison Agendas/trunk/src/Agendas.Tests/Cruds/RequestEmulator.cs @ 137:2d1adbaf0373
CRUD de Patrocinador
author | nelopauselli |
---|---|
date | Thu, 28 Jul 2011 09:26:24 -0300 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
136:462a78196d11 | 137:2d1adbaf0373 |
---|---|
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 } |