EntityReference<TEntity>.Attach(TEntity) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates a many-to-one or one-to-one relationship between two objects in the object context.
public void Attach(TEntity entity);
override this.Attach : 'Entity -> unit
Public Sub Attach (entity As TEntity)
Parameters
- entity
- TEntity
The object being attached.
Exceptions
When the entity is null.
When the entity cannot be related to the current related end. This can occur when the association in the conceptual schema does not support a relationship between the two types.