Update @inject
to support keyed services · Issue #9286 · dotnet/razor (original) (raw)
We added support for keyed services on the runtime as part of dotnet/aspnetcore#50561. We should consider what syntax we want to use when this is exposed through the @inject
directive.
Some options are:
@inject Key Type PropertyName
.@inject Type Key PropertyName
.@inject Type(Key) PropertyName
.
This would be for Blazor and Razor pages, since both added support for it.