I use Entity Framework and I my tables are defined with Guid as Id field.
Now, I have in one table a Guid field, which is related to an other table, which can be 0 or one.
When I try to insert an empty field like:
Code: Select all
Table.GuidField = Guid.Empty
' Or
Table.GuidField = Nothing
(Which is specific for Guid.Empty)
The Problem is, that I get an Foreign Key Error, because in the related table, there is no GUID record, which has this value (of Course there is no one)
But, how can I set this field to NULL?
THX