简体   繁体   中英

delete mapping from edmx

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!

我不确定我是否完全理解,您有一个POCO类,然后同一类在EDMX中也有定义,并且您要在POCO中指定某些属性,还是在EDMX中指定某些属性?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM