ICarterModule as Singleton services?
KevinValmo opened this issue · comments
Hello.
This could be a discussion or a feature that could be added or not...
I was thinking about "old" Controller
s and ControllerBase
s on the Mvc namespace.
As the "old" Controller
s are by default transient service (not always), don't you think to preserve this behaviur by adding to Services
the ICarterModule
s as transient?
Isn't it better to mark modules as transient lifetime services?
Or it could be better maybe to let devs configure the lifetime of those ICarterModule
s service within an implementation of a ICarterModuleFactory
or somethig else.
Carter/src/Carter/CarterExtensions.cs
Lines 76 to 79 in 5dc8a5e