Database Reference
In-Depth Information
How It Works
When you change an independent association into a foreign key association, most of your existing code will
continue to work. You will find it easier now to associate two entities by simply setting the exposed foreign key to
the appropriate value. To change a relationship with an independent association, you need to create a new instance
of EntityKey and set the entity's xxxReference.EntityKey to this new instance. With a foreign key association, you
simply set the exposed foreign key property to the key value.
Foreign key associations are not currently supported for many-to-many associations because these associations
must be mapped to the underlying link table. A future version of Entity Framework may support foreign key
associations, along with payloads, for many-to-many associations.
 
Search WWH ::




Custom Search