Question

I wanted to add a new property to one of my model (table). Basically its a property that doesn't exist in the database but i need to add it to my model so that the custom generation tool (self tracking entity generator) will create the the property inside the the custom generated file.

I added a scaler property, its a string and called testme but it gives me the following error, Anybody know how i can fix this?

Error 2538 Error 11009: Property 'testme' is not mapped.

I am confused why do i need to map it to a table... its a field that doesn't exist in the table ...

Any help really appreciated

Thanks

Was it helpful?

Solution

Generally, you add un-mapped properties to a partial class instead of via the model. That said, use discretion; un-mapped properties can be confusing, since they mostly can't be used in LINQ to Entities queries.

OTHER TIPS

I encountered this problem and was able to resolve it by deleting the entity (a view) in tne designer and readding it by refreshing from the database. This occured after a major redesign of the database and rewriting the view.

I know this doesn't address your problem, but Googling for this error returns this question. Hopefully this answer will be useful to others who are new to EF and hit this message, like I did.

I've been generating my DB from my conceptual model. If I modify the model without updating the DB, then I see this error message.

At the moment I don't have any data in my model, so simply regenerating the DB from the changed model makes these errors go away.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top