annotate Agendas/trunk/src/Agendas.Repositories.NHibernate/PonenteRepository.cs @ 89:24e9488ac152

mapeo de property UrlInvitacion entre viewmodel y entity
author jorge.rowies
date Tue, 31 May 2011 16:31:24 -0300
parents 963b71ea6028
children db4b1e2cae49
rev   line source
63
963b71ea6028 Repositorios con NH
nelopauselli
parents:
diff changeset
1 using System.Collections.Generic;
963b71ea6028 Repositorios con NH
nelopauselli
parents:
diff changeset
2 using AltNetHispano.Agendas.Domain;
963b71ea6028 Repositorios con NH
nelopauselli
parents:
diff changeset
3 using AltNetHispano.Agendas.Domain.Repositories;
963b71ea6028 Repositorios con NH
nelopauselli
parents:
diff changeset
4 using NHibernate;
963b71ea6028 Repositorios con NH
nelopauselli
parents:
diff changeset
5
963b71ea6028 Repositorios con NH
nelopauselli
parents:
diff changeset
6 namespace AltNetHispano.Agendas.Repositories.NHibernate
963b71ea6028 Repositorios con NH
nelopauselli
parents:
diff changeset
7 {
963b71ea6028 Repositorios con NH
nelopauselli
parents:
diff changeset
8 public class PonenteRepository : RepositoryBase<Ponente>, IPonenteRepository
963b71ea6028 Repositorios con NH
nelopauselli
parents:
diff changeset
9 {
963b71ea6028 Repositorios con NH
nelopauselli
parents:
diff changeset
10 public PonenteRepository(ISessionFactory sessionFactory) : base(sessionFactory)
963b71ea6028 Repositorios con NH
nelopauselli
parents:
diff changeset
11 {
963b71ea6028 Repositorios con NH
nelopauselli
parents:
diff changeset
12 }
963b71ea6028 Repositorios con NH
nelopauselli
parents:
diff changeset
13
963b71ea6028 Repositorios con NH
nelopauselli
parents:
diff changeset
14 public IList<Ponente> GetAll()
963b71ea6028 Repositorios con NH
nelopauselli
parents:
diff changeset
15 {
963b71ea6028 Repositorios con NH
nelopauselli
parents:
diff changeset
16 return Session.QueryOver<Ponente>().List();
963b71ea6028 Repositorios con NH
nelopauselli
parents:
diff changeset
17 }
963b71ea6028 Repositorios con NH
nelopauselli
parents:
diff changeset
18
963b71ea6028 Repositorios con NH
nelopauselli
parents:
diff changeset
19 public Ponente GetByNombre(string ponenteNombre)
963b71ea6028 Repositorios con NH
nelopauselli
parents:
diff changeset
20 {
963b71ea6028 Repositorios con NH
nelopauselli
parents:
diff changeset
21 return Session.QueryOver<Ponente>().Where(p => p.Nombre == ponenteNombre).SingleOrDefault();
963b71ea6028 Repositorios con NH
nelopauselli
parents:
diff changeset
22 }
963b71ea6028 Repositorios con NH
nelopauselli
parents:
diff changeset
23 }
963b71ea6028 Repositorios con NH
nelopauselli
parents:
diff changeset
24 }