You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Microsoft.AspNetCore already has a concept of HostingEnvironment. Maybe we should take a wrapper that allows these types of configs to be setup to determine which dependency to actually register, based on the environment.
For example, if I were to be running this on a system that doesn't need to connect to a database, but in production I want it to, I'd expect to see the following:
[Dependency(Environment=Config.Staging)]publicclassInMemoryRepository:IRepository{// does in-memory version of IRepository work}[Dependency(Environment=Config.Production)]publicclassDatabaseRepository:IRepository{// does database version of IRepository work}
We can default this to an Any this way ones that are not configured, register for all sets
The text was updated successfully, but these errors were encountered:
Microsoft.AspNetCore already has a concept of
HostingEnvironment
. Maybe we should take a wrapper that allows these types of configs to be setup to determine which dependency to actually register, based on the environment.For example, if I were to be running this on a system that doesn't need to connect to a database, but in production I want it to, I'd expect to see the following:
We can default this to an
Any
this way ones that are not configured, register for all setsThe text was updated successfully, but these errors were encountered: