Foreign key problem with nested linq to sql insert?

Ok I have found the solution If there is another fk you need to add the current nested data also to the parent collection, this way l2s will get as many fk identity values as you need For this example it will be: n1. Nested3. Add(n3) After n2.

Nested3. Add(n3).

Ok I have found the solution. If there is another fk you need to add the current nested data also to the parent collection, this way l2s will get as many fk identity values as you need. For this example it will be: n1.

Nested3. Add(n3); After n2. Nested3.

Add(n3).

Error: "The INSERT statement conflicted with the FOREIGN KEY constraint "FK_nested3_nested1". The conflict occurred in database "TESTDB. MDF", table "dbo.

Nested1", column 'id'. To its parent nested2 id there is no problem, it seems that l2s can't get the identity from nested1 only from previous parent. So how to overcome this?

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions