0
votes

I currently have OData - Entity Framework (DB first approach) connected & working.

The problem we faced is backward-forward compatibility where Service / DB can be upgraded independently. If DB has a new column, that doesn't cause an issue with an older model, but if model contains a new column that the DB doesn't contain, it errors out on trying to connect. I cannot do model versioning in entity framework since multiple entity cannot be mapped to 1 table.

Trying to solve the problem by handling the OData query to SQL conversion. This way it can be model free or atleast have a model based on schema version, something like DynamicOData library.

I wanted to know if there is any known pattern / open-source options available that people have tried.

1

1 Answers

0
votes

Entity Framework Core allows you to map POCO to table/view. Reference: https://docs.microsoft.com/en-us/ef/core/get-started/aspnetcore/existing-db

Could get different POCO map to same table/view by using different DbContexts.