63
|
1 using System.Collections.Generic;
|
|
2 using AltNetHispano.Agendas.Domain;
|
|
3 using AltNetHispano.Agendas.Domain.Repositories;
|
|
4 using NHibernate;
|
|
5
|
|
6 namespace AltNetHispano.Agendas.Repositories.NHibernate
|
|
7 {
|
|
8 public class PonenteRepository : RepositoryBase<Ponente>, IPonenteRepository
|
|
9 {
|
|
10 public PonenteRepository(ISessionFactory sessionFactory) : base(sessionFactory)
|
|
11 {
|
|
12 }
|
|
13
|
|
14 public IList<Ponente> GetAll()
|
|
15 {
|
|
16 return Session.QueryOver<Ponente>().List();
|
|
17 }
|
|
18
|
|
19 public Ponente GetByNombre(string ponenteNombre)
|
|
20 {
|
|
21 return Session.QueryOver<Ponente>().Where(p => p.Nombre == ponenteNombre).SingleOrDefault();
|
|
22 }
|
|
23 }
|
|
24 } |