Marks an entity as needed. Needed entities are not detached/released from the context until the client scope is disposed.

Namespace:  C1.Data
Assembly:  C1.Data.Entity (in C1.Data.Entity.dll)

Syntax

C#
public void AddRef(
	Object entity
)
Visual Basic
Public Sub AddRef ( _
	entity As Object _
)

Parameters

entity
Type: System..::..Object
An entity to be marked as needed.

Remarks

Client views and C1DataSource classes mark entities as needed automatically. Use this method only when you fetch entities using other means, bypassing Studio for EF classes with direct access to the underlying object context. When you no longer need those entities, call Release(Object). AddRef and Release are counting, every AddRef call must be balanced by a Release call.

See Also