LINQ: Create persistable Associations in Code, Without Foreign Key
Posted
by Alex
on Stack Overflow
See other posts from Stack Overflow
or by Alex
Published on 2009-09-14T00:37:16Z
Indexed on
2010/04/13
14:13 UTC
Read the original article
Hit count: 392
Hello, I know that I can create LINQ Associations without a Foreign Key. The problem is, I've been doing this by adding the [Association] attribute in the DBML file (same as through the designer), which will get erased again after I refresh my database (and reload the entire table structure).
I know that there is the MyData.cs file (as part of the DBML) in which I can place my partial extensions etc. to domain objects (to persist even after I refresh the DBML), but I don't know how to create an association there?
© Stack Overflow or respective owner