OData / ModelBuilder

A project to generate Edm (Entity Data Model) from CLR types
19 stars 19 forks source link

Enable ModelBuilder to cache expressions for annotations. #18

Closed marabooy closed 3 years ago

marabooy commented 3 years ago

Short summary (3-5 sentences) describing the issue. Currently the model builder codebase can allow one to build expressions for annotations. Allowing the code to cache the expressions could enable users to perform a check to see if the constructor has anything or is empty.
This will allow other odata dependent libraries to use model builder's current annotations configurations for their own processing including WebApiAuthorizations https://github.com/OData/ModelBuilder/blob/b4b2ed5ca5b04ef78f16b3e613caaa8f4a7f3cbc/src/Microsoft.OData.ModelBuilder/Vocabularies/Capabilities/V1/ExpandRestrictionsConfiguration.cs#L72

One good way to do this would be to make sure when item are added the property constructors are modified accordingly and the expression is built already.

Assemblies affected

Which assemblies and versions are known to be affected e.g. OData ModelBuilder 1.x