Exemplo n.º 1
0
        protected virtual DbContextOptions CreateOptions(SqlServerTestStore testStore, bool rowNumberPaging)
        {
            var builder = testStore.AddProviderOptions(new DbContextOptionsBuilder())
                          .EnableSensitiveDataLogging()
                          .ConfigureWarnings(
                b => b.Default(WarningBehavior.Throw)
                .Log(CoreEventId.SensitiveDataLoggingEnabledWarning)
                .Log(CoreEventId.ManyServiceProvidersCreatedWarning));

            if (rowNumberPaging)
            {
                new SqlServerDbContextOptionsBuilder(builder).UseRowNumberForPaging();
            }

            return(builder.Options);
        }