我正在使用实体框架4并有一个问题:
我的数据库中有一个密码列,我想使用自定义sql进行管理.所以我不希望模型对此有所了解.
我尝试在Mapping Details窗口中删除该属性,但后来出现了编译错误:
Error 3023: Problem in mapping fragments starting at line 1660:Column User.Password in table User must be mapped: It has no default value and is not nullable.
因此,我在数据库中使列可以为空并更新了模型.现在我收到此错误:
Error 3004: Problem in mapping fragments starting at line 1660:No mapping specified for properties User.Password,User.Salt in Set Users.
An Entity with Key (PK) will not round-trip when:
Entity is type [UserDirectoryModel.User]
有什么想法吗?
谢谢,
缺口