Пример #1
0
        public virtual void Distinct_used_after_order_by()
        {
            using var context = CreateContext();
            var customers = context.Set <Customer>().OrderBy(x => x.Address).Distinct().Take(5).ToList();

            Assert.NotEmpty(customers);

            Assert.Equal(
                CoreResources.LogDistinctAfterOrderByWithoutRowLimitingOperatorWarning(new TestLogger <SqlServerLoggingDefinitions>()).GenerateMessage(),
                Fixture.TestSqlLoggerFactory.Log[1].Message);
        }