I would like to know if it is possible to do dependency injection (custom constructor) in a ASP.NET Web API without the use of third party libraries such as Unity or StructureMap and without Entity Framework.
What I would like to achieve is have a controller with a constructor such as:
public Controller(IDatabaseConnector connector) { ... }
I know for MVC you can make a custom ControllerFactory by inheriting from DefaultControllerFactory and then overriding the GetControllerInstance function. So I am sure there is an alternative for Web API.
IDependencyResolverfor web api. Make sure it is for Web API as MVC has its own with the same name.IHttpControllerActivatorfor this.