public override async Task Paging_operation_without_orderby_issues_warning_async() { await base.Paging_operation_without_orderby_issues_warning_async(); Assert.Contains( CoreResources.LogRowLimitingOperationWithoutOrderBy(new TestLogger <SqlServerLoggingDefinitions>()).GenerateMessage( "(from Customer <generated>_2 in DbSet<Customer> select [<generated>_2]).Skip(__p_0).Take(__p_1)"), Fixture.TestSqlLoggerFactory.Log.Select(l => l.Message)); }
public virtual void Take_without_order_by() { using var context = CreateContext(); var customers = context.Set <Customer>().Take(5).ToList(); Assert.NotNull(customers); Assert.Equal( CoreResources.LogRowLimitingOperationWithoutOrderBy(new TestLogger <CosmosLoggingDefinitions>()).GenerateMessage(), Fixture.TestSqlLoggerFactory.Log[1].Message); }
public virtual void Include_collection_does_not_generate_warning() { using var context = CreateContext(); var customer = context.Set <Customer>().Include(e => e.Orders).AsSplitQuery().Single(e => e.CustomerID == "ALFKI"); Assert.NotNull(customer); Assert.Equal(6, customer.Orders.Count); Assert.DoesNotContain( CoreResources.LogRowLimitingOperationWithoutOrderBy(new TestLogger <SqlServerLoggingDefinitions>()).GenerateMessage(), Fixture.TestSqlLoggerFactory.Log.Select(e => e.Message)); }