EF 5.0 Model First - How to Create Non-Displayable Properties
1 answer
NotMapped
properties are not part of your mapping. When the first approach to the model is used, the EDMX is a mapping, so every property that is defined in the diagram is displayed. If you want to have a property that is not displayed, it should not be defined in the chart. All classes generated by EF code generators are partial, so you only need to create your own partial class part (it must be in the same namespace and assembly as the generated part) and define your non-mapped property in the code.
+5
source to share