I have a case when my entities that I need to expose through OData are completely dynamic (e.g., user can configure which fields he wants to expose). Query results from repository are stored in special generic class that has a dictionary for actual data (FieldName/Value), so CLR type is one for all. I have complete knowledge about the entity (entity name, entity fields and their types).
Because of that I can't build EDM model in design-time using ODataModelBuilder methods like Entity, EntitySet or HasKey(), Property() from EntityTypeConfiguration.
Is it possible to build EDM model from scratch? ODataModelBuilder uses EntityTypeConfiguration, but it depends on CLR type of entity. Basically I need to declare several entity types with one CLR type for all of them.
Please advise.