2 ms·
In ASP.NET's case I think DI is useful for the way the framework is structured. It just makes it easier to register services using DI container and call the cod
by DeathArrow 5y ago
In ASP.NET's case I think DI is useful for the way the framework is structured. It just makes it easier to register services using DI container and call the code in controllers and other services.
You can, how ever, to not use DI at all. Write the business logic in controllers. Write business logic in static classes. Write business logic in regular classes but instead of registering in DI container you instantiate them yourself.