Error 3031 displaying snippets starting at line 439: Null-value column

Error 3031: Problem in mapping fragments starting at line 439:Non-nullable column D_LINK.CARTON_QTY in table D_LINK is mapped to a nullable entity property.

I have a view D_LINKwith a column

CARTON_QTY(int, not null)

I don’t understand where my problem is, should I do it null \ how?

+5
source share
7 answers

The error indicates that your column in the table / view is not null, but the class property in the entity model is null. They must be either nullable or invalid.

+7
source

update the table in your edmx from your database (in the model browser, right-click → Update model from database → update tab → select your table → click update)

+8
source

none-nullable . :

  • , : (0... 1) .edbx.
  • , ​​ DRM.

( ). , -.

+1

. .

+1

EF 4.5, , .

DRM , , , , edmx, , .

, edmx , edmx . EF 4.5 , Entity, , .

0

If you want to save the record. Only cancel removes the error, otherwise the rebuilt table

0
source

I decided to solve it 1. Delete specific tables from the model 2. Right-click on the model, select "Update Model" from the database, select the deleted tables and click "Finish."

0
source

All Articles