How can I model a 0...n relationship between two tables?
Posted: Fri 01 Apr 2016 08:58
Hi,
it's quite surprising, really, but I just had the first situation where I wanted to model a 0...n relation between two tables, and couldn't do it.
At first I tried creating a 1...n relation and checked the 'Nullable' checkbox on the foreign key, but that doesn't work (I get a .NET exception telling me that a conversion between In32 and Nullable<uint> did not succeed, no stacktrace.).
I then decided to search around but couldn't find any option or button or anything to do this.
Does Linq2SQL only support 1..n/n..m/1..1 relations between tables?
it's quite surprising, really, but I just had the first situation where I wanted to model a 0...n relation between two tables, and couldn't do it.
At first I tried creating a 1...n relation and checked the 'Nullable' checkbox on the foreign key, but that doesn't work (I get a .NET exception telling me that a conversion between In32 and Nullable<uint> did not succeed, no stacktrace.).
I then decided to search around but couldn't find any option or button or anything to do this.
Does Linq2SQL only support 1..n/n..m/1..1 relations between tables?