예제 #1
0
파일: Repository.cs 프로젝트: cbayles/Siege
        public IQueryable <T> Queryable <T>() where T : class
        {
            var query = new QuerySpecification <T>();

            query.WithUnitOfWork(unitOfWork.For <TDatabase>());

            return(query.ToIQueryable());
        }
예제 #2
0
파일: Repository.cs 프로젝트: cbayles/Siege
        public IQuery <T> Query <T>(Func <IQueryable <T>, IQueryable <T> > expression) where T : class
        {
            var query = new QuerySpecification <T>();

            query.WithUnitOfWork(unitOfWork.For <TDatabase>());
            query = new QuerySpecification <T>(expression(query.ToIQueryable()));

            return(new Query <T>(query));
        }