EF 5.0 Model First - How To Make Not Mapped Properties
问题 Code First has the attribute [NotMapped] for properties which are not to be mapped: how would one achieve the same thing in model-first mode? 回答1: NotMapped properties are not part of your mapping. When the model first approach is used EDMX represents the mapping so every property defined in the diagram is mapped. If you want to have non-mapped property it must not be defined in the diagram. All classes generated by EF's code generation are partial so you only need to create your own partial