I’m missing something basic here. I cannot figure how to resolve to IoC elements inside a function where the class isn’t a service or a request object?
Let’s say in the DataLayer, a class needs access to the db so it needs a reference to IDbConnection.
Is the general idea to create a globally accessible singleton which can resolve to the IDbConnection and return it?
Basically, how does an arbitrary class resolve a reference to an IoC dependency?