jspuij / RESTier

A turn-key library for building RESTful services
http://odata.github.io/RESTier
Other
2 stars 0 forks source link

Multiple API Controllers #41

Open robertmclaws opened 3 years ago

robertmclaws commented 3 years ago

Need to double-check the regression where you can't have more than one API/Model in the container. Currently, having a second API pulls the first DBContext from the Container.

jspuij commented 3 years ago

Internal notes / todo:

robertmclaws commented 3 years ago

Let's talk through these, but they're going to need to be done off the Main branch first, and not your .NET Core fork.

Seems like some of these things could be fixed if you registered a per route configuration class that mapped the route name to the Api and DbContext types. Then the model stuff could come off the the specific ApiBase instance instead of the current structure, and you would pull the Config instance out of the DI container to find the specific instance type to grab.

Also, would like to know more about the per-route DI container in OData, and if that's per named route or per generated route.