diff --git a/Directory.Build.props b/Directory.Build.props index 35cd9e4..e51cdf3 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -7,7 +7,6 @@ true true CS1591 - Debug;Release;DebugV1 @@ -34,7 +33,7 @@ 3.1.0 3.1.0 - 5.0 + 5.0.10 diff --git a/tests/EntityFrameworkCore.Projectables.FunctionalTests/ComplexModelTests.cs b/tests/EntityFrameworkCore.Projectables.FunctionalTests/ComplexModelTests.cs index 84af05c..6ce61b3 100644 --- a/tests/EntityFrameworkCore.Projectables.FunctionalTests/ComplexModelTests.cs +++ b/tests/EntityFrameworkCore.Projectables.FunctionalTests/ComplexModelTests.cs @@ -79,7 +79,7 @@ namespace EntityFrameworkCore.Projectables.FunctionalTests [Fact] public Task ProjectOverMethodTakingDbContext() { - using var dbContext = new SampleDbContext(); + using var dbContext = new SampleDbContext(Infrastructure.CompatibilityMode.Full); var query = dbContext.Set() .Select(x => x.GetLastOrderFromExternalDbContext(dbContext)); diff --git a/tests/EntityFrameworkCore.Projectables.FunctionalTests/ExtensionsMethods/ExtensionMethodTests.cs b/tests/EntityFrameworkCore.Projectables.FunctionalTests/ExtensionsMethods/ExtensionMethodTests.cs index f525e85..fdfe87e 100644 --- a/tests/EntityFrameworkCore.Projectables.FunctionalTests/ExtensionsMethods/ExtensionMethodTests.cs +++ b/tests/EntityFrameworkCore.Projectables.FunctionalTests/ExtensionsMethods/ExtensionMethodTests.cs @@ -52,7 +52,7 @@ namespace EntityFrameworkCore.Projectables.FunctionalTests.ExtensionMethods [Fact] public Task ExtensionMethodAcceptingDbContext() { - using var dbContext = new SampleDbContext(); + using var dbContext = new SampleDbContext(Infrastructure.CompatibilityMode.Full); var sampleQuery = dbContext.Set() .Select(x => dbContext.Set().Where(y => y.Id > x.Id).FirstOrDefault()); diff --git a/tests/EntityFrameworkCore.Projectables.FunctionalTests/Helpers/SampleDbContext.cs b/tests/EntityFrameworkCore.Projectables.FunctionalTests/Helpers/SampleDbContext.cs index 23320da..6613156 100644 --- a/tests/EntityFrameworkCore.Projectables.FunctionalTests/Helpers/SampleDbContext.cs +++ b/tests/EntityFrameworkCore.Projectables.FunctionalTests/Helpers/SampleDbContext.cs @@ -5,6 +5,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using EntityFrameworkCore.Projectables.Extensions; +using EntityFrameworkCore.Projectables.Infrastructure; using Microsoft.EntityFrameworkCore; namespace EntityFrameworkCore.Projectables.FunctionalTests.Helpers @@ -12,11 +13,18 @@ namespace EntityFrameworkCore.Projectables.FunctionalTests.Helpers public class SampleDbContext : DbContext where TEntity : class { + readonly CompatibilityMode _compatibilityMode; + + public SampleDbContext(CompatibilityMode compatibilityMode = CompatibilityMode.Limited) + { + _compatibilityMode = compatibilityMode; + } + protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) { optionsBuilder.UseSqlServer("Server=(localdb)\v11.0;Integrated Security=true"); // Fake connection string as we're actually never connecting optionsBuilder.UseProjectables(options => { - options.CompatibilityMode(Infrastructure.CompatibilityMode.Full); // Needed by our ComplexModelTests + options.CompatibilityMode(_compatibilityMode); // Needed by our ComplexModelTests }); }