You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
|
|
|
|
|
|
|
|
|
using EntityFrameworkCore.Jet.Infrastructure;
|
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
|
|
|
|
|
|
|
|
namespace EntityFrameworkCore.Jet.FunctionalTests.TestUtilities
|
|
|
|
|
{
|
|
|
|
|
public static class JetDbContextOptionsBuilderExtensions
|
|
|
|
|
{
|
|
|
|
|
public static JetDbContextOptionsBuilder ApplyConfiguration(this JetDbContextOptionsBuilder optionsBuilder)
|
|
|
|
|
{
|
|
|
|
|
var maxBatch = TestEnvironment.GetInt(nameof(JetDbContextOptionsBuilder.MaxBatchSize));
|
|
|
|
|
if (maxBatch.HasValue)
|
|
|
|
|
{
|
|
|
|
|
optionsBuilder.MaxBatchSize(maxBatch.Value);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
optionsBuilder.UseQuerySplittingBehavior(QuerySplittingBehavior.SingleQuery);
|
|
|
|
|
|
|
|
|
|
optionsBuilder.ExecutionStrategy(d => new TestJetRetryingExecutionStrategy(d));
|
|
|
|
|
|
|
|
|
|
optionsBuilder.CommandTimeout(JetTestStore.CommandTimeout);
|
|
|
|
|
|
|
|
|
|
return optionsBuilder;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|