Search code examples
sqlentity-frameworkentity-framework-4

Error 3031 mapping fragments starting at line 439:Non-nullable 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_LINK with a column

CARTON_QTY(int, not null)

I dont understand where is my problem do i have to make it null \ how?


Solution

  • The error says that your column in the table / view is not nullable but the property of the class in entity model is nullable. They must both be either nullable or not nullable.