Mercurial > altnet-hispano
view Agendas/trunk/src/Agendas.Repositories.NHibernate/PonenteRepository.cs @ 126:6012f2becf97
Se agrega instalación de nuget package para el calendario de google.
author | alabra |
---|---|
date | Tue, 28 Jun 2011 23:35:22 -0400 |
parents | db4b1e2cae49 |
children | 2dbb15f4510f |
line wrap: on
line source
using System; using System.Collections.Generic; using AltNetHispano.Agendas.Domain; using AltNetHispano.Agendas.Domain.Repositories; using NHibernate; namespace AltNetHispano.Agendas.Repositories.NHibernate { public class PersonaRepository : RepositoryBase<Persona>, IPersonaRepository { public PersonaRepository(ISessionFactory sessionFactory) : base(sessionFactory) { } public IList<Persona> GetAll() { return Session.QueryOver<Persona>().List(); } public Persona GetByNombre(string ponenteNombre) { return Session.QueryOver<Persona>().Where(p => p.Nombre == ponenteNombre).SingleOrDefault(); } public Cuenta GetCuenta(IdentityProviderEnum identityProvider, string username) { return Session.QueryOver<Cuenta>().Where(c => c.IdentityProvider == identityProvider && c.LogonName == username). SingleOrDefault(); } } }