문제

I 'm working on an ASP.NET Dynamic Data Entities Web Application.

When trying to insert a new entry in one of the tables, with some value in the column_name field, I get the following message :

Cannot insert the value NULL into column 'column_name', table 'DATABASE.dbo.table_name'; column does not allow nulls. INSERT fails.

The column properties are :

  • Entity Key : True
  • Nullable : False
  • Type : String

I believe Dynamic Data is trying to send null value to entity framework for some reason, but I don't know which.

Do you know why Dynamic Data is behaving that way ? Or have you any idea how to debug the insert process ?

Thanks

도움이 되었습니까?

해결책

I found where the problem come from. A table from the database the model is based contains a trigger. For some reason the model makes an association between the two tables involved in the trigger.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top