using System; using System.Collections.Generic; using System.Linq; using NHibernate; using NHibernate.Linq; using AshMind.Sample.Repositories.Internal; namespace AshMind.Sample.Repositories { public class Repository { protected ISession Session { get; private set; } public Repository(ISession session) { this.Session = session; } public IQueryable Query() { var query = (Query)this.Session.Linq(); return new Query( new KeyEnabledQueryProvider(((IQueryable)query).Provider), ((IQueryable)query).Expression, query.QueryOptions ); } } }