LINQ to SQL - 1-to-1 Association Problem

In the L2S designer, I reset the table and view. I tried to add a connection between the two in my primary keys. This should be a one-to-one relationship, so I set the association power property as such.

But when coding, I cannot access the child property.

Any suggestions?

Edit

I just created a view on sql server that has the fields I want and dumped them in L2S. Much easier.
+3
source share
3 answers

Linq To SQL / , . .

, , ...

Linq To SQL

:

, , , / . LinqToSQL . Auto-Sync on Parent Table, .

. CLR .

: http://msdn.microsoft.com/en-us/library/bb386971.aspx

+5

. DBML .

+2

Have you disabled (set to false) either a child or a parent property?

Perhaps you incorrectly matched the one-to-one relationship (for example, I did less than an hour ago)?

0
source

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


All Articles