Mercurial > altnet-hispano
view Agendas/trunk/src/Agendas.Repositories.NHibernate/PonenteRepository.cs @ 63:963b71ea6028
Repositorios con NH
author | nelopauselli |
---|---|
date | Tue, 17 May 2011 14:02:25 -0300 |
parents | |
children | db4b1e2cae49 |
line wrap: on
line source
using System.Collections.Generic; using AltNetHispano.Agendas.Domain; using AltNetHispano.Agendas.Domain.Repositories; using NHibernate; namespace AltNetHispano.Agendas.Repositories.NHibernate { public class PonenteRepository : RepositoryBase<Ponente>, IPonenteRepository { public PonenteRepository(ISessionFactory sessionFactory) : base(sessionFactory) { } public IList<Ponente> GetAll() { return Session.QueryOver<Ponente>().List(); } public Ponente GetByNombre(string ponenteNombre) { return Session.QueryOver<Ponente>().Where(p => p.Nombre == ponenteNombre).SingleOrDefault(); } } }