diff Agendas/trunk/src/Agendas.Repositories.NHibernate/EventoRepository.cs @ 237:51faeabfb9d9

Todos los tests en verde quitando al ponente principal
author nelopauselli
date Tue, 04 Oct 2011 21:30:55 -0300
parents c61954d24c8c
children 5cc1681d3789
line wrap: on
line diff
--- a/Agendas/trunk/src/Agendas.Repositories.NHibernate/EventoRepository.cs	Tue Oct 04 20:42:46 2011 -0300
+++ b/Agendas/trunk/src/Agendas.Repositories.NHibernate/EventoRepository.cs	Tue Oct 04 21:30:55 2011 -0300
@@ -4,6 +4,7 @@
 using AltNetHispano.Agendas.Domain;
 using AltNetHispano.Agendas.Domain.Repositories;
 using NHibernate;
+using NHibernate.Linq;
 
 namespace AltNetHispano.Agendas.Repositories.NHibernate
 {
@@ -50,7 +51,7 @@
 
 	    public bool ExistePonente(Persona ponente)
 	    {
-            return Session.QueryOver<Evento>().Where(ev => ev.Ponentes.Contains(ponente)).RowCount() > 0;
+            return Session.Query<Evento>().Where(ev => ev.Ponentes.Contains(ponente)).Any();
 	    }
 
 	    public IList<Evento> GetByState(EventoState state)