I would like to ask how the classes that implement the WEB API are initialized. In particular, there is a set of logic for which the parent is ApiController , but contrary to the recommendation that such classes should contain a public constructor with no parameters, the constructor contains some list of input arguments.

For example:

 public class UserManagerController : ApiController { ... public UserManagerController(IAccountManager accountManager, IUserContext userContext){ ... } ... } 

AccountManager and IUserContext are user interfaces. I am even more interested in such a moment, how can I convey my type? For example, the IAccountManager interface has one implementing class, let's say we create another class that implements this interface.

How does the system determine which object to substitute into the constructor?

0