I needed to add a new NVARCHAR column to a table in my DB. So I added a column and then activated Visual Studio to update the EDMX file for the Entity Framework.
I ran the update model from the database over everything that only led to the fact that the "data reader is incompatible" - these were. Therefore, I renamed the entire table in the database, updated EDMX from the database, renamed the table back to its original name, started the update again, and then created a new import of functions for all affected stored procedures. But I still get the same error:
The data reader is incompatible with the specified "[Model]. [Entity]". a member of the type, '[Column]', does not have a corresponding column in the data reader with the same name.
I looked around a bit, and this seems to be a common mistake if the column name is different in the database and structure. However, this is not so; they have the same name.
I can access the column in the code through [Entity] .Context. [Column], so I don’t quite understand what the data reader is complaining about.
I have run out of ideas, so any help is appreciated.
source
share