Is there an existing issue for this?
Is your feature request related to a problem? Please describe the problem.
Property injection is not supported in the default service container, but now required members are coming with C# 11.
Describe the solution you'd like
Property injection like in legacy ASP.NET via something like an InjectAttribute could be valuable. Maybe required members should even be automatically detected.
Additional context
I was not able to find any reasoning as to why property injection was omitted in ASP.NET Core's default service container, so I don't know if the fact that property injection was considered a design issue since it makes dependencies optional was a factor.
If it was a factor, a lot of ASP.NET Core boilerplate could be massively reduced via property injection the way required members will now reduce constructor boilerplate.
Is there an existing issue for this?
Is your feature request related to a problem? Please describe the problem.
Property injection is not supported in the default service container, but now required members are coming with C# 11.
Describe the solution you'd like
Property injection like in legacy ASP.NET via something like an
InjectAttributecould be valuable. Maybe required members should even be automatically detected.Additional context
I was not able to find any reasoning as to why property injection was omitted in ASP.NET Core's default service container, so I don't know if the fact that property injection was considered a design issue since it makes dependencies optional was a factor.
If it was a factor, a lot of ASP.NET Core boilerplate could be massively reduced via property injection the way required members will now reduce constructor boilerplate.