Mercurial > altnet-hispano
diff Agendas/trunk/src/Agendas.Factories/AgendaFactory.cs @ 100:cc91817a4206
Merge
author | jorge.rowies |
---|---|
date | Sat, 04 Jun 2011 22:46:06 -0300 |
parents | db4b1e2cae49 |
children | a456eb519e23 |
line wrap: on
line diff
--- a/Agendas/trunk/src/Agendas.Factories/AgendaFactory.cs Sat Jun 04 22:33:05 2011 -0300 +++ b/Agendas/trunk/src/Agendas.Factories/AgendaFactory.cs Sat Jun 04 22:46:06 2011 -0300 @@ -1,5 +1,8 @@ -using Agendas.NHibernate; +using System; +using Agendas.NHibernate; using AltNetHispano.Agendas.Domain; +using AltNetHispano.Agendas.Domain.Repositories; +using AltNetHispano.Agendas.Domain.Services; using AltNetHispano.Agendas.Repositories.NHibernate; using NHibernate; @@ -13,7 +16,18 @@ public static Agenda GetAgenda() { ISessionFactory sessionFactory = NhHelper.GetSessionFactory(); - return _agenda ?? (_agenda = new Agenda(null, new EventoRepository(sessionFactory), new PonenteRepository(sessionFactory))); + return _agenda ?? (_agenda = new Agenda(null, new EventoRepository(sessionFactory), new PersonaRepository(sessionFactory))); + } + + public static IPersonaRepository GetPersonaRepository() + { + ISessionFactory sessionFactory = NhHelper.GetSessionFactory(); + return new PersonaRepository(sessionFactory); + } + + public static PersonaService GetPersonaService() + { + return new PersonaService(GetPersonaRepository()); } } } \ No newline at end of file