コード例 #1
0
        public virtual IQueryable <T> GetAll(Expression <Func <T, bool> > whereExpr = null)
        {
            var query = _context.AsQueryable();

            if (whereExpr != null)
            {
                query = query.Where(whereExpr);
            }
            return(query);
        }
コード例 #2
0
        private static IEnumerator <NuGetPackage> Synchronized(AsyncEnumerator <NuGetPackage> async, Func <IQueryable <NuGetPackage>, IQueryable <NuGetPackage> > getNotEvaluated)
        {
            var syncList = new AsyncEnumerable <NuGetPackage>(async);

            var withFilter = getNotEvaluated(syncList.AsQueryable());

            return(withFilter.GetEnumerator());
        }