jspuij / RESTier

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

RestierController move Api property to constructor argument. #27

Closed jspuij closed 5 years ago

jspuij commented 5 years ago

RestierController has an Api property that fetches the ApiBase instance through the serviceprovider. Lets make the dependency clear by making it a constructor argument.

jspuij commented 5 years ago

Part of https://github.com/OData/RESTier/issues/629.

jspuij commented 5 years ago

This can only be done when ASP.NET webapi actually uses DI as well, as normal ASP.NET webapi does not support constructor arguments on controllers. Question is whether this is a wanted side effect.