Is it possible to add a property to an entity where the property is not supposed to map to the database?
A:
Possible? Sure; add it to a custom partial class matching your entity type. Useful? Less so; you (mostly) can't use them in LINQ to Entities queries, and you shouldn't re-purpose your entities as view models.
Craig Stuntz
2010-05-05 12:12:26
Thanks alot for the feedback
seddler
2010-05-05 12:39:43
Adding properties in an partial class works fine when reading from database to display info on screen. But when I'm saving an entity I get an error telling me that the column (the added property) does not exist. How can I avoid thid issue? Any thoughts?
seddler
2010-05-18 09:40:35
I can't give a useful answer with only a vague description of the error you're seeing and nothing precise about what you're doing. The source code, the exact error, and a call stack is really a minimum for "debugging over the web."
Craig Stuntz
2010-05-18 12:39:29