Base solution for your next web application
Open Closed

Api versioning help #5521


User avatar
0
stealthdev created

I am trying to implement Api Versioning in my Host project, and I need to version the dynamic controller created by the Services.

I found that someone had successfully done this here: #3189@6303334b-68c5-4a50-9583-0e6fb0f83111

He left a step by step direction, however, the last step of what he did is not too clear and I don't understand how he was able to register his RegionAppService to DI. I have it pretty much working except that last piece. Does anyone know how to register to DI form those instructions?

Also, has anyone come up with a better solution of how we can version both the regular controller and the dynamic controllers?


1 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    I think it is the line;

    IocManager.IocContainer.Register(Classes.FromAssemblyNamed(typeof(HbOnlineApiV1Module).Assembly.FullName).BasedOn<IApiV1Service>().LifestylePerThread().WithServiceSelf());