开发者

delete mapping from edmx

开发者 https://www.devze.com 2023-02-27 05:46 出处:网络
In the edmx file I deleted some of the properties because I don\'t want to add them to the POCO object, but each time I get that kind of exception:

In the edmx file I deleted some of the properties because I don't want to add them to the POCO object, but each time I get that kind of exception:

Error   1   Error 3023: Problem in mapping fragments starting at line 255:Column COMPANY.contact_phone_number in table COMPANY must be mapped: It has no default value and is not nullable.

Why do开发者_开发百科 I need map those columns if they don't have default values and are not nullable??


I get it.
I must map non-nullable fields without default value because when inserting there must be a value to the field!


I'm not sure I completely understand, you have a POCO class and then that same class also has a definition in the EDMX and you're specifying some properties in the POCO and some in the EDMX?

0

精彩评论

暂无评论...
验证码 换一张
取 消