7.0.0 Preview 1
Pre-release
Pre-release
commonsensesoftware
released this
14 Nov 15:47
·
147 commits
to main
since this release
This is the first preview release for ASP.NET Core with .NET 7.0 support. No additional work is planned, but there are some breaking changes that can be tried, tested, and discussed before promoting to the official release.
Features
ASP.NET Core
- Migrate from
IProblemDetailsFactory
toIProblemDetails
- Adding grouping support for
MapGroup
in Minimal APIs
Versioning Minimal APIs still requires a version set which collates configured API versions, but the new MapGroup
support makes the setup more natural.
var builder = WebApplication.CreateBuilder( args );
builder.Services.AddApiVersioning();
var app = builder.Build();
var orders = app.MapGroup( "/api/order" ).WithApiVersionSet();
orders.MapGet( "/{id:int}", ( int id ) => new Order() { Id = id, Customer = "John Doe" } ).HasApiVersion( 1.0 );
ASP.NET Core with OData
- OData does not officially support .NET 7, but it is compatible
- It is assumed that the eventual support will continue to be forward compatible or bump to
9.0
- A breaking change in
9.0
could cause complication or require a major version bump for OData packages here
- It is assumed that the eventual support will continue to be forward compatible or bump to
Breaking Changes
- As previously announced, .NET Core 3.1 has been dropped and is end of life in December 2022
- Minimal APIs implementation:
IVersionedEndpointConventionBuilder
andVersionedEndpointConventionBuilder
have been removed and are no longer necessaryDefaultApiVersionSetBuilderFactory
now has a parameterless, default constructorIVersionedEndpointConventionBuilder WithApiVersionSet(IEndpointConventionBuilder, ApiVersionSet)
is nowTBuilder WithApiVersionSet<TBuilder>(TBuilder, ApiVersionSet) where TBuilder : notnull, IEndpointConventionBuilder
ProblemDetails
implementationIProblemDetailsFactory
has been removed and is supplanted by the built-inIProblemDetailsService
- The built-in
IServiceCollection.AddProblemDetails()
must be called to addProblemDetails
- This puts the control in your hands
- Can result in a behavioral breaking change if you omit the setup
If you have additional input or feedback, please provide them in the discussion. This will be the one and only time to discuss it before the release becomes official.