Skip to content

jeremybytes/method-injection-aspnetcore

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Method Injection in API Controllers vs MVC Controllers

Description

Method Injection in ASP.NET Core got a little bit easier in .NET 7. Before .NET 7, we had to use the [FromServices] attribute on a method parameter in order for the parameter to be injected from the services collection / dependency injection container. Starting with .NET 7, the [FromServices] parameter became optional, but only in some places.

Description of the code can be found here:
Method Injection in ASP.NET Core: API Controllers vs MVC Controllers

Other Documentation:


About

Code samples for "Method Injection in ASP.NET Core: API Controllers vs. MVC Controllers"

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published