Skip to content

Design notes for V2.

Jan-Willem Spuij edited this page Aug 19, 2019 · 1 revision

This is a collection of design notes and questions for V2.

Chaining

Chaining of several classes defining a single interface is now done using the DI container. The implementation is completely dependent on the specific container being Microsoft.Extensions.DependencyInjection. As it's a chain, only the final implementation of an interface is relevant to obtain. All other handlers will be invoked by calling inner handlers. I propose to take out the DI stuff and let users construct the chain manually at DI configuration. We could provide methods to construct the default chain quickly without configuration, but thats it.'

OData model builder.

Our modelbuilder implementations encapsulate OdataConventionModelBuilder but do not expose it. This way we cannot change the model before build. Also calling GetEdmModel ourselves violates DI principles, it should be done by the user after DI composition (e.g. the original building in Odata of the Model before passing it to Map Route is OK.). Propose to make our Builders inherit OdataModelBuilder, or encapsulate + expose (facade).

Clone this wiki locally