Skip to content

Commit 15ff5f2

Browse files
authored
Upgrade EF and MongoDB.Driver dependencies (#191)
* Upgrade EF and MongoDB.Driver dependencies. * Remove EF InMemory provider from UnitTests.
1 parent 88681d4 commit 15ff5f2

File tree

7 files changed

+15
-33
lines changed

7 files changed

+15
-33
lines changed

src/MongoDB.EntityFrameworkCore/MongoDB.EntityFrameworkCore.csproj

+3-3
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,16 @@
2828
</PropertyGroup>
2929

3030
<ItemGroup Condition=" '$(Configuration)' == 'Release' Or '$(Configuration)' == 'Debug' ">
31-
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.12" />
31+
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.13" />
3232
</ItemGroup>
3333

3434
<ItemGroup Condition=" '$(Configuration)' == 'Release EF9' Or '$(Configuration)' == 'Debug EF9' ">
35-
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="9.0.1" />
35+
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="9.0.2" />
3636
</ItemGroup>
3737

3838
<ItemGroup>
3939
<InternalsVisibleTo Include="MongoDB.EntityFrameworkCore.UnitTests" />
40-
<PackageReference Include="MongoDB.Driver" Version="3.1.0" />
40+
<PackageReference Include="MongoDB.Driver" Version="3.2.1" />
4141
<PackageReference Remove="Microsoft.SourceLink.GitHub" />
4242
</ItemGroup>
4343
</Project>

src/MongoDB.EntityFrameworkCore/Storage/MongoClientWrapper.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ await indexManager.CreateOneAsync(CreateIndexDocument(index, name, path), null,
196196
.Where(o => o.FindDeclaredOwnership()?.PrincipalEntityType == entityType);
197197
foreach (var ownedEntityType in ownedEntityTypes)
198198
{
199-
var elementName = ownedEntityType.GetContainingElementName();
199+
var elementName = ownedEntityType.GetContainingElementName()!;
200200
var newPath = path.Append(elementName).ToArray();
201201
await CreateIndexesAsync(ownedEntityType, indexManager, existingIndexNames, newPath, cancellationToken)
202202
.ConfigureAwait(false);

tests/MongoDB.EntityFrameworkCore.FunctionalTests/Design/Generated/EF8/SimpleContextModelBuilder.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ partial void Initialize()
2020
EveryTypeEntityType.CreateAnnotations(everyType);
2121
OwnedEntityEntityType.CreateAnnotations(ownedEntity);
2222

23-
AddAnnotation("ProductVersion", "8.0.12");
23+
AddAnnotation("ProductVersion", "8.0.13");
2424
}
2525
}
2626
}

tests/MongoDB.EntityFrameworkCore.FunctionalTests/Design/Generated/EF9/SimpleContextModelBuilder.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ namespace MongoDB.EntityFrameworkCore.FunctionalTests.Design
1111
public partial class SimpleContextModel
1212
{
1313
private SimpleContextModel()
14-
: base(skipDetectChanges: false, modelId: new Guid("66ff4156-3f1d-4a25-9bd7-02a7fbd79dd7"), entityTypeCount: 2)
14+
: base(skipDetectChanges: false, modelId: new Guid("2b0d2ae5-714a-4009-b10e-b62d90176aa0"), entityTypeCount: 2)
1515
{
1616
}
1717

@@ -25,7 +25,7 @@ partial void Initialize()
2525
EveryTypeEntityType.CreateAnnotations(everyType);
2626
OwnedEntityEntityType.CreateAnnotations(ownedEntity);
2727

28-
AddAnnotation("ProductVersion", "9.0.1");
28+
AddAnnotation("ProductVersion", "9.0.2");
2929
}
3030
}
3131
}

tests/MongoDB.EntityFrameworkCore.FunctionalTests/MongoDB.EntityFrameworkCore.FunctionalTests.csproj

+5-5
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,20 @@
1111
</PropertyGroup>
1212
<ItemGroup>
1313
<ProjectReference Include="..\..\src\MongoDB.EntityFrameworkCore\MongoDB.EntityFrameworkCore.csproj" />
14-
<PackageReference Include="MongoDB.Driver.Encryption" Version="3.1.0" />
14+
<PackageReference Include="MongoDB.Driver.Encryption" Version="3.2.1" />
1515
<Compile Remove="Design\Generated\**" />
1616
</ItemGroup>
1717

1818

1919
<ItemGroup Condition=" '$(Configuration)' == 'Release' Or '$(Configuration)' == 'Debug' ">
20-
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.12" />
21-
<PackageReference Include="Microsoft.EntityFrameworkCore.Proxies" Version="8.0.12" />
20+
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.13" />
21+
<PackageReference Include="Microsoft.EntityFrameworkCore.Proxies" Version="8.0.13" />
2222
<Compile Include="Design\Generated\EF8\**" />
2323
</ItemGroup>
2424

2525
<ItemGroup Condition=" '$(Configuration)' == 'Release EF9' Or '$(Configuration)' == 'Debug EF9' ">
26-
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="9.0.1" />
27-
<PackageReference Include="Microsoft.EntityFrameworkCore.Proxies" Version="9.0.1" />
26+
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="9.0.2" />
27+
<PackageReference Include="Microsoft.EntityFrameworkCore.Proxies" Version="9.0.2" />
2828
<Compile Include="Design\Generated\EF9\**" />
2929
</ItemGroup>
3030

tests/MongoDB.EntityFrameworkCore.UnitTests/Extensions/MongoDbContextOptionsExtensionsTest.cs

-17
Original file line numberDiff line numberDiff line change
@@ -66,23 +66,6 @@ public static void Can_configure_with_mongo_client_and_database_name(string data
6666
Assert.Equal(databaseName, mongoOptions.DatabaseName);
6767
}
6868

69-
[Theory]
70-
[InlineData("mongodb://localhost:1234", "myDatabaseName")]
71-
public static void Throws_when_multiple_ef_providers_specified(string connectionString, string databaseName)
72-
{
73-
var options = new DbContextOptionsBuilder()
74-
.UseMongoDB(connectionString, databaseName)
75-
.UseInMemoryDatabase(Guid.NewGuid().ToString())
76-
.ConfigureWarnings(x => x.Ignore(CoreEventId.ManyServiceProvidersCreatedWarning))
77-
.Options;
78-
79-
var context = new DbContext(options);
80-
81-
Assert.Contains(
82-
"Only a single database provider can be registered",
83-
Assert.Throws<InvalidOperationException>(() => context.Model).Message);
84-
}
85-
8669
[Fact]
8770
public static void LogFragment_does_not_contain_password()
8871
{

tests/MongoDB.EntityFrameworkCore.UnitTests/MongoDB.EntityFrameworkCore.UnitTests.csproj

+3-4
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,16 @@
55
</PropertyGroup>
66

77
<ItemGroup>
8-
<PackageReference Include="Microsoft.EntityFrameworkCore.Specification.Tests" Version="8.0.12"/>
8+
<PackageReference Include="Microsoft.EntityFrameworkCore.Specification.Tests" Version="8.0.13" />
9+
<PackageReference Update="Microsoft.NET.Test.Sdk" Version="17.13.0" />
910
</ItemGroup>
1011

1112
<ItemGroup Condition=" '$(Configuration)' == 'Release' Or '$(Configuration)' == 'Debug' ">
12-
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="8.0.12"/>
1313
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.2"/>
1414
</ItemGroup>
1515

1616
<ItemGroup Condition=" '$(Configuration)' == 'Release EF9' Or '$(Configuration)' == 'Debug EF9' ">
17-
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="9.0.1"/>
18-
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="9.0.1"/>
17+
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="9.0.2"/>
1918
</ItemGroup>
2019

2120
<ItemGroup>

0 commit comments

Comments
 (0)