EntityRepositoryGetLocalObjectByKey Method |
Finds local object with the specified repository-specific key.
Returns null if the object is not found in the local buffer.
Namespace:
Aloe.SystemFrameworks.Domain
Assembly:
Aloe.SystemFrameworks.Domain (in Aloe.SystemFrameworks.Domain.dll) Version: 20.1.3.5
Syntaxpublic EntityObject GetLocalObjectByKey(
ObjectTransaction transaction,
Guid key,
bool searchDeletedObjects = false
)
Public Function GetLocalObjectByKey (
transaction As ObjectTransaction,
key As Guid,
Optional searchDeletedObjects As Boolean = false
) As EntityObject
public:
EntityObject^ GetLocalObjectByKey(
ObjectTransaction^ transaction,
Guid^ key,
bool searchDeletedObjects = false
)
member GetLocalObjectByKey :
transaction : ObjectTransaction *
key : Guid *
?searchDeletedObjects : bool
(* Defaults:
let _searchDeletedObjects = defaultArg searchDeletedObjects false
*)
-> EntityObject
Parameters
- transaction
- Type: Aloe.SystemFrameworks.DomainObjectTransaction
The transaction to contain the object. - key
- Type: SystemGuid
The repository-specific key of the object. - searchDeletedObjects (Optional)
- Type: SystemBoolean
if set to true searches also through deleted objects.
Return Value
Type:
EntityObject
The object with the specified key.
Exceptions
Remarks
The repository specific key might be different from the primary object Id.
For the most derived (terminal) repository types, it is usually the same.
But for base classes, the repository specific key is usually different.
It identifies the object among all objects from the base repository.
See Also