public AsyncEnumerable(IEnumerable <T> enumerable)
        {
            _innerEnumerable = enumerable;

            var provider = new AsyncQueryProvider <T>(_innerEnumerable);

            Provider = provider;

            if (_innerEnumerable is IQueryable <T> queryable && queryable.Expression is Microsoft.EntityFrameworkCore.Query.QueryRootExpression)
            {
                Expression = queryable.Expression;
            }
            else
            {
                Expression = new QueryRootExpression(provider, new FakeEntityType(typeof(T)));
            }
        }
Esempio n. 2
0
 public AsyncEnumerable(IEnumerable <T> enumerable, QueryRootExpression expression) : this(enumerable)
 {
     Expression = expression;
 }