comparison Agendas/trunk/src/Agendas.Factories/NHibernateFactory.cs @ 179:1deccd6c3cb2

Aplicando seguridad x roles en sitio web
author nelopauselli
date Mon, 08 Aug 2011 15:24:26 -0300
parents Agendas/trunk/src/Agendas.Factories/AttributeFactory.cs@c8099df941bd
children
comparison
equal deleted inserted replaced
178:33e57fd1a6c9 179:1deccd6c3cb2
1 using System;
2 using System.Web.Mvc;
3 using Agendas.NHibernate;
4
5 namespace AltNetHispano.Agendas.Factories
6 {
7 public static class NHibernateFactory
8 {
9 public static ActionFilterAttribute GetNHibernateSessionPerAction()
10 {
11 return new NHibernateSessionPerActionAttribute(NhHelper.GetSessionFactory());
12 }
13
14 public static IDisposable GetSessionScope()
15 {
16 return new SessionScope(NhHelper.GetSessionFactory());
17 }
18 }
19 }