Let's imagine we have a table in the database where, through the client interface, it is possible to add columns dynamically using ADO. In the backend, I am using the Entity Framework (EF) to query on this database. However, the model in my code is fixed and does not reflect these additional dynamic columns that are added to the table.
Since the additional columns are not defined in my EF model, when EF tries to build the query, it launches an exception because the new columns are not registered in the model. This happens because EF expects the model properties to match the table columns in the database.
How could you handle this situation in order to get those new additional fields without constantly modifying the model in the code? In other words, how can I recover these dynamic data from EF if the new columns are not registered in the model, considering that in a production environment you do not want to constantly modify the EF scheme?