You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 02bf2c6
Browse filesBrowse the repository at this point in the historyBrowse files
Unique constraints in EF Core: retarget net10.0, EF Core 10, built-in OpenAPI (#2209)
Retarget both projects from net8.0 to net10.0.
Packages: EF Core and EF Core SqlServer 8.0.2 to 10.0.12, AspNetCore.OpenApi
8.0.2 to 10.0.12, Mvc.Testing 8.0.2 to 10.0.12, Test.Sdk 17.8.0 to 18.10.1,
xunit 2.5.3 to 2.9.3, xunit.runner.visualstudio 2.5.3 to 4.0.0, coverlet
6.0.0 to 10.0.1, Testcontainers.MsSql 3.7.0 to 4.15.0, FluentAssertions
6.12.0 to 7.2.2. Removed Swashbuckle.AspNetCore (replaced by AddOpenApi and
MapOpenApi) and EntityFrameworkCore.InMemory (referenced by no source file).
Code:
- Planet gains OrbitalPeriod, which the article's composite index examples use.
- Program.cs: AddOpenApi/MapOpenApi in place of Swagger; Add instead of
AddAsync (the async form exists for value generators that hit the database);
catch (DbUpdateException) instead of a bare catch, which is the exception a
unique index violation arrives as; .WithOpenApi() dropped, deprecated on
.NET 10 (ASPDEPR002).
- SolarSystemApiApplicationFactory: MsSqlBuilder takes the image parameter,
the parameterless constructor is obsolete on Testcontainers 4.x (CS0618).
- Connection string: Database=SolarSystem instead of Database=Master, so the
sample stops creating its tables in the server's master database.
- Both live tests set OrbitalPeriod, now a required member.
Build: 0 errors, 0 warnings on SDK 10.0.302. Repo CI runs no tests in this
folder, its filter excludes every Live-named test.
Copy file name to clipboardExpand all lines: dotnet-efcore/UniqueConstraintsInEFCore/UniqueConstraintsInEFCore.Tests/SolarSystemApiApplicationFactory.cs
Copy file name to clipboardExpand all lines: dotnet-efcore/UniqueConstraintsInEFCore/UniqueConstraintsInEFCore.Tests/UniqueConstraintsInEFCore.Tests.csproj
0 commit comments