changeset 246:70c5cab59054

refactor menor en repositorios
author nelopauselli
date Fri, 07 Oct 2011 12:36:47 -0300
parents bdc946dd5c94
children 92c912b46307
files Agendas/trunk/src/Agendas.Repositories.NHibernate/EventoRepository.cs Agendas/trunk/src/Agendas.Repositories.NHibernate/RepositoryBase.cs
diffstat 2 files changed, 3 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/Agendas/trunk/src/Agendas.Repositories.NHibernate/EventoRepository.cs	Fri Oct 07 09:41:55 2011 -0300
+++ b/Agendas/trunk/src/Agendas.Repositories.NHibernate/EventoRepository.cs	Fri Oct 07 12:36:47 2011 -0300
@@ -19,11 +19,6 @@
 			Session.Delete(evento);
 		}
 
-		public new Evento Get(Guid vanId)
-		{
-			return Session.Get<Evento>(vanId);
-		}
-
 		public IList<Evento> GetActivos()
 		{
 			return
--- a/Agendas/trunk/src/Agendas.Repositories.NHibernate/RepositoryBase.cs	Fri Oct 07 09:41:55 2011 -0300
+++ b/Agendas/trunk/src/Agendas.Repositories.NHibernate/RepositoryBase.cs	Fri Oct 07 12:36:47 2011 -0300
@@ -8,7 +8,7 @@
 	{
 		private readonly ISessionFactory _sessionFactory;
 
-		public RepositoryBase(ISessionFactory sessionFactory)
+		protected RepositoryBase(ISessionFactory sessionFactory)
 		{
 			_sessionFactory = sessionFactory;
 		}
@@ -22,7 +22,8 @@
 
         public T Get(Guid id)
         {
-            return Session.QueryOver<T>().Where(i => i.Id == id).SingleOrDefault();
+			return Session.Get<T>(id);
+			//return Session.QueryOver<T>().Where(i => i.Id == id).SingleOrDefault();
         }
 
 	}