Search code examples
asp.net-web-apidependency-injectioninversion-of-controlaspnetboilerplate

Where are IApplicationServices registered in ABP framework?


I know that services that implement IApplicationService are automatically registered but I cannot for the life of me find out where in the framework this happens. I have spent the last day searching through the ABP solution trying to understand how this works (in the context of dynamic API generation), so I can extend the functionality in a project I am working on, but have gotten no where so far. I appreciate any help I can get in sending me in the right direction.


Solution

  • For Dynamic WebApi controllers, a single controller is generated in Build method of ApiControllerBuilder class. You can check it here https://github.com/aspnetboilerplate/aspnetboilerplate/blob/master/src/Abp.Web.Api/WebApi/Controllers/Dynamic/Builders/ApiControllerBuilder.cs#L153.

    I hope this helps.