diff Agendas/trunk/src/Agendas.Repositories.NHibernate/EventoRepository.cs @ 235:c61954d24c8c

Quitando ponente principal y utilizando siempre la lista de ponentes
author nelopauselli
date Tue, 04 Oct 2011 20:42:35 -0300
parents 7d838e7d83b3
children 51faeabfb9d9
line wrap: on
line diff
--- a/Agendas/trunk/src/Agendas.Repositories.NHibernate/EventoRepository.cs	Wed Sep 28 20:02:44 2011 -0300
+++ b/Agendas/trunk/src/Agendas.Repositories.NHibernate/EventoRepository.cs	Tue Oct 04 20:42:35 2011 -0300
@@ -1,5 +1,6 @@
 using System;
 using System.Collections.Generic;
+using System.Linq;
 using AltNetHispano.Agendas.Domain;
 using AltNetHispano.Agendas.Domain.Repositories;
 using NHibernate;
@@ -49,7 +50,7 @@
 
 	    public bool ExistePonente(Persona ponente)
 	    {
-            return Session.QueryOver<Evento>().Where(ev => ev.Ponente == ponente).RowCount() > 0;
+            return Session.QueryOver<Evento>().Where(ev => ev.Ponentes.Contains(ponente)).RowCount() > 0;
 	    }
 
 	    public IList<Evento> GetByState(EventoState state)