Mercurial > altnet-hispano
view Agendas/trunk/src/Agendas.Repositories.NHibernate/RepositoryBase.cs @ 288:a6037c6c88d8
Se soluciona bug #198 Bug: Summary incorrecto en Google Calendar.
Se parametriza la hora en el mensaje.
author | user@MECHUQUE |
---|---|
date | Mon, 30 Jan 2012 01:52:47 -0300 |
parents | 70c5cab59054 |
children |
line wrap: on
line source
using System; using AltNetHispano.Agendas.Domain; using NHibernate; namespace AltNetHispano.Agendas.Repositories.NHibernate { public class RepositoryBase<T> where T : Identificable { private readonly ISessionFactory _sessionFactory; protected RepositoryBase(ISessionFactory sessionFactory) { _sessionFactory = sessionFactory; } protected ISession Session { get { return _sessionFactory.GetCurrentSession(); } } public void Save(T obj) { Session.Save(obj); } public T Get(Guid id) { return Session.Get<T>(id); //return Session.QueryOver<T>().Where(i => i.Id == id).SingleOrDefault(); } } }