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.
41 lines
1.5 KiB
C#
41 lines
1.5 KiB
C#
using EntityFramework.Jet.FunctionalTests.TestUtilities;
|
|
using EntityFrameworkCore.Jet;
|
|
using Extensions.DependencyInjection;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Query;
|
|
using Microsoft.EntityFrameworkCore.TestUtilities;
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
using Microsoft.Extensions.Logging;
|
|
|
|
namespace EntityFramework.Jet.FunctionalTests
|
|
{
|
|
public class ComplexNavigationsQueryJetFixture : ComplexNavigationsQueryFixtureBase
|
|
{
|
|
public static readonly string DatabaseName = "ComplexNavigations";
|
|
|
|
private readonly DbContextOptions _options;
|
|
|
|
private readonly string _connectionString
|
|
= JetTestStore.CreateConnectionString(DatabaseName);
|
|
|
|
public TestSqlLoggerFactory TestSqlLoggerFactory { get; } = new TestSqlLoggerFactory();
|
|
|
|
public ComplexNavigationsQueryJetFixture()
|
|
{
|
|
var serviceProvider = new ServiceCollection()
|
|
.AddEntityFrameworkJet()
|
|
.AddSingleton(TestModelSource.GetFactory(OnModelCreating))
|
|
.AddSingleton<ILoggerFactory>(TestSqlLoggerFactory)
|
|
.BuildServiceProvider(validateScopes: true);
|
|
|
|
_options = new DbContextOptionsBuilder()
|
|
.EnableSensitiveDataLogging()
|
|
.UseJet(_connectionString, b => b.ApplyConfiguration())
|
|
.UseInternalServiceProvider(serviceProvider).Options;
|
|
}
|
|
|
|
|
|
|
|
protected override ITestStoreFactory TestStoreFactory => JetTestStoreFactory.Instance;
|
|
}
|
|
} |