Entity Framework 4.0: adding scaler property gives an error (property not displayed: 11009)?

I wanted to add a new property to my model (table). This is basically a property that does not exist in the database, but I need to add it to my model so that the user-generated tool (an entity generator for self-tracking) creates a property inside a custom generated file.

I added the scaler property, its line, and called testme, but that gives me the following error. Does anyone know how I can fix this?

Error 2538 Error 11009: the 'testme' property is not displayed.

I am confused why I need to map it to a table ... its field that does not exist in the table ...

Any help really appreciated

thanks

+4
source share
3 answers

Typically, you add non-printable properties to an incomplete class, not through a model. However, use discretion; non-displayable properties can be misleading, as they can’t be mainly used in LINQ to Entities queries.

+1
source

I ran into this problem and was able to solve it by deleting the object (view) in the designer and reading it, updating the database. This happened after a major redesign of the database and rewriting of the presentation.

+1
source

I know this does not concern your problem, but Googling for this error returns this question. Hope this answer will be useful to others who are not familiar with EF and hit this post like me.

I create my database from my conceptual model. If I modify the model without updating the database, then I see this error message.

At the moment, I do not have data in my model, so simply restoring the database from the modified model makes these errors go away.

0
source

Source: https://habr.com/ru/post/1302871/


All Articles