The “X” property on “Y” could not be set to a 'null' value. You must set this property to a non-null value of type 'Int32'

前端 未结 11 1426
花落未央
花落未央 2020-12-29 21:38

When I run my application and I click a specific button I get the error:

\"The \"X\" property on \"Y\" could not be set to a \'null\' value. You must set thi         


        
11条回答
  •  没有蜡笔的小新
    2020-12-29 21:45

    I verified that the entity was pointing at the correct database.

    I then deleted the table from the .edmx file and added it again.

    Problem solved.

提交回复
热议问题