Click or drag to resize

RepositoryConsumeObjects Method

Consumes and returns the objects found in the specified buffer.

Namespace:  Aloe.SystemFrameworks.Domain
Assembly:  Aloe.SystemFrameworks.Domain (in Aloe.SystemFrameworks.Domain.dll) Version: 20.1.3.5
Syntax
public virtual IEnumerable<DomainObject> ConsumeObjects(
	ObjectTransaction transaction,
	IBuffer buffer,
	bool includeDeletedRows = false
)

Parameters

transaction
Type: Aloe.SystemFrameworks.DomainObjectTransaction
The transaction, which will contain the emitted objects.
buffer
Type: Aloe.SystemFrameworks.Domain.DataAccessIBuffer
The buffer containing the objects data. When null, the transactions primary buffer is used for the enumeration.
includeDeletedRows (Optional)
Type: SystemBoolean
if set to true enumerates also objects in the deleted rows.

Return Value

Type: IEnumerableDomainObject
The enumerated objects.
Remarks

Consuming object is different from simple enumeration. It is like the difference between obtaining reference vs copying the value of an object. Enumeration of entity objects simply returns the corresponding entity object in the primary buffer. Consuming the objects copies the data to the primary buffer and returns refernce to the copy.

For non-entity objects, there is no difference, since they are always instantiated pointing to the original data source.

See Also