Mercurial > altnet-hispano
comparison Agendas/trunk/src/Agendas.Factories/AgendaFactory.cs @ 94:db4b1e2cae49
Cambio del nombre de la clase Ponente a Persona
Se agrega la clase Cuenta para identificar cada una de las cuentas con que se puede autenticar una persona
Alta Automatica de cuentas de twitter creando la persona
author | Nelo@Kenia.neluz.int |
---|---|
date | Sat, 04 Jun 2011 12:11:17 -0300 |
parents | 26d0513a8410 |
children | a456eb519e23 |
comparison
equal
deleted
inserted
replaced
93:65f0b3d70c18 | 94:db4b1e2cae49 |
---|---|
1 using Agendas.NHibernate; | 1 using System; |
2 using Agendas.NHibernate; | |
2 using AltNetHispano.Agendas.Domain; | 3 using AltNetHispano.Agendas.Domain; |
4 using AltNetHispano.Agendas.Domain.Repositories; | |
5 using AltNetHispano.Agendas.Domain.Services; | |
3 using AltNetHispano.Agendas.Repositories.NHibernate; | 6 using AltNetHispano.Agendas.Repositories.NHibernate; |
4 using NHibernate; | 7 using NHibernate; |
5 | 8 |
6 | 9 |
7 namespace AltNetHispano.Agendas.Factories | 10 namespace AltNetHispano.Agendas.Factories |
11 private static Agenda _agenda; | 14 private static Agenda _agenda; |
12 | 15 |
13 public static Agenda GetAgenda() | 16 public static Agenda GetAgenda() |
14 { | 17 { |
15 ISessionFactory sessionFactory = NhHelper.GetSessionFactory(); | 18 ISessionFactory sessionFactory = NhHelper.GetSessionFactory(); |
16 return _agenda ?? (_agenda = new Agenda(null, new EventoRepository(sessionFactory), new PonenteRepository(sessionFactory))); | 19 return _agenda ?? (_agenda = new Agenda(null, new EventoRepository(sessionFactory), new PersonaRepository(sessionFactory))); |
20 } | |
21 | |
22 public static IPersonaRepository GetPersonaRepository() | |
23 { | |
24 ISessionFactory sessionFactory = NhHelper.GetSessionFactory(); | |
25 return new PersonaRepository(sessionFactory); | |
26 } | |
27 | |
28 public static PersonaService GetPersonaService() | |
29 { | |
30 return new PersonaService(GetPersonaRepository()); | |
17 } | 31 } |
18 } | 32 } |
19 } | 33 } |