Skip to content

Commit 7e83cb4

Browse files
Keyed services to What's new /7 (dotnet#30677)
* Keyed services to What's new /7 * Keyed services to What's new /7 * Keyed services to What's new /7 * Keyed services to What's new /7 * Keyed services to What's new /7 * Keyed services to What's new /7 * Keyed services to What's new /7 * Keyed services to What's new /7 * Keyed services to What's new /7
1 parent cee5341 commit 7e83cb4

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

aspnetcore/release-notes/aspnetcore-8.0.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,14 @@ This article is under development and not complete. More information may be foun
2929

3030
[!INCLUDE [](~/includes/preview-notice.md)]
3131

32+
## ASP.NET Core improvements in .NET 8
33+
34+
### Keyed services support in Dependency Injection
35+
36+
Keyed services provides a mechanism for registering and retrieving Dependency Injection (DI) services using keys. Keys allow for scoping of registration and consumption of services. Support has been added using the [`[FromKeyedServices]`](xref:Microsoft.Extensions.DependencyInjection.FromKeyedServicesAttribute) attribute.
37+
38+
:::code language="csharp" source="~/../AspNetCore.Docs.Samples/samples/KeyedServices/Program.cs" highlight="6,7,12-14,39,47":::
39+
3240
## Blazor
3341

3442
### Full-stack web UI
@@ -673,11 +681,11 @@ Apps that use asynchronous I/O and that may have more than one write outstanding
673681

674682
## Authentication and authorization
675683

676-
ASP.NET Core 8 adds new features to authentication and authorization.
684+
ASP.NET Core 8 adds new features to authentication and authorization.
677685

678686
### Identity API endpoints
679687

680-
[MapIdentityApi\<TUser>()](https://source.dot.net/#Microsoft.AspNetCore.Identity/IdentityApiEndpointRouteBuilderExtensions.cs,32) is a new extension method that adds two API endpoints (`/register` and `/login`). The main goal of the `MapIdentityApi` is to make it easy for developers to use ASP.NET Core Identity for authentication in JavaScript-based single page apps (SPA) or Blazor apps. Instead of using the default UI provided by ASP.NET Core Identity, which is based on Razor Pages, MapIdentityApi adds JSON API endpoints that are more suitable for SPA apps and non-browser apps. For more information, see [Identity API endpoints](https://devblogs.microsoft.com/dotnet/asp-net-core-updates-in-dotnet-8-preview-4/#identity-api-endpoints).
688+
[`MapIdentityApi<TUser>`](https://source.dot.net/#Microsoft.AspNetCore.Identity/IdentityApiEndpointRouteBuilderExtensions.cs,32) is a new extension method that adds two API endpoints (`/register` and `/login`). The main goal of the `MapIdentityApi` is to make it easy for developers to use ASP.NET Core Identity for authentication in JavaScript-based single page apps (SPA) or Blazor apps. Instead of using the default UI provided by ASP.NET Core Identity, which is based on Razor Pages, MapIdentityApi adds JSON API endpoints that are more suitable for SPA apps and non-browser apps. For more information, see [Identity API endpoints](https://devblogs.microsoft.com/dotnet/asp-net-core-updates-in-dotnet-8-preview-4/#identity-api-endpoints).
681689
682690
### IAuthorizationRequirementData
683691

0 commit comments

Comments
 (0)