public async Task Should_not_evaluate_ef_functions_prematurely()
        {
            var asyncResultStream = _queryable
                                    .Where(p => DbFunctionsExtensions.Like(null, p.Value, "%e")) // EF.Functions.Like(<property>, <pattern>)
                                    .AsAsyncEnumerable();
            var result = await ToArrayAsync(asyncResultStream).ConfigureAwait(false);

            result.Length.ShouldBe(2);
        }
Пример #2
0
        public async Task Should_not_evaluate_ef_functions_prematurely()
        {
            var result = await _queryable
                         .Where(p => DbFunctionsExtensions.Like(null, p.Value, "%e")) // EF.Functions.Like(<property>, <pattern>)
                         .ToListAsync()
                         .ConfigureAwait(false);

            result.Count.ShouldBe(2);
        }