Error 2016: condition cannot be specified for a member of a column

I'm having some problems with Entity Framework in VS2010

The problem I am getting is very well described here ...

http://social.msdn.microsoft.com/Forums/en/adonetefx/thread/cacf6a76-09a8-4c90-9502-d8b87c2f6bea

This basically happens when the foreign key points to the primary key of another table ... but if I take StoreGeneratedPatternboth Identity, then he will try to insert a value in the identification field

EDIT

So, it looks like EF4 cannot handle the zero relation when the primary key is set to StoreGeneratedPattern="Identity". If I create an FK pointing to this primary key and make it null (effectively creating a connection 0...M), then it throws this compilation error.

Removing StoreGeneratedPattern="Identity"fixes the problem but causes problems. It works if the foreign key is set to invalid.

+1
source share
2 answers

So, I talked to someone at DevWeek this week, and we managed to find the answer ...

, , fk , . fk , , ( ). EF FK - , , ... . !

0

Source: https://habr.com/ru/post/1740505/


All Articles