Assembly: EPiServer.Data (in EPiServer.Data.dll) Version: 8.0.0
Extracts the identity from the object if it has one.
C# |
---|
public static Identity GetIdentity( this Object value ) |
The algorith used to extract identity is as follows: 1. The object is checked to see if it implements the IDynamicData interface and if so its Id property is called. 2. The object is reflected to search for a property named Id with a getter whose type is either Identity or Guid 3. The object is checked to see if it implements the IEntity interface and if so its ID and UniqueId properties are called