Updated to EF5 now NotMapped annotation doesn't work

China☆狼群 提交于 2019-12-05 00:26:20

Annotation attributes in EF 5.0 with .NET 4.5 were moved to System.ComponentModel.DataAnnotations assembly and System.ComponentModel.DataAnnotations.Schema namespace.

[NotMapped] is in System.ComponentModel.DataAnnotations.Schema. Make sure to add using System.ComponentModel.DataAnnotations.Schema; to your code.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!