• DXC Service
  • Products
    • Episerver CMS
    • Episerver Commerce
    • Episerver Campaign
    • Episerver Find
    • Episerver Personalization
      • Advance
      • Perform
      • Insight
      • Reach
      • Personalized Find
    • Episerver Social API
    • Episerver apps & integrations
    • Ektron CMS
  • Documentation
    • Get started
      • DXC Service
      • CMS
      • Commerce
      • Campaign
      • Find
      • Personalization
      • Insight
      • Social API
      • Service API
    • Developer guides
      • DXC Service
      • CMS
      • Commerce
      • Campaign
      • Find
      • Advance
      • Perform
      • Reach
      • Personalized Find
      • Insight
      • Tracking
      • Profile Store
      • Content Delivery API
      • Social API
      • Service API
      • Forms
      • MA connectors
    • UI feature list
    • Technical overview
    • System requirements
    • Installation
    • User guide
    • APIs and libraries
      • CMS
      • Commerce
      • Campaign
      • Find
      • Social
      • REST APIs
    • Video tutorials
    • Releases
    • Upgrading
      • CMS
      • Commerce
      • Find
      • Forms
      • Service API
      • Personalization
  • Blogs
  • Forum
  • Support
  • EMVPs
  • Register
  • Log in
All Content Documentation Forum User Guide Support Help Center Blogs Articles Releases Bug List SDK Documents
People
Home / Documentation /
  • ValidationService Constructor
  • GetIdentity
  • GetOriginalType
  • Initialize(InitializationEngine)
  • Initialize(ITypeScannerLookup, IServiceLocator)
  • SetIdentity
  • ToPropertyBag(Object)
  • ToPropertyBag(Object, IEnumerable(String))
  • Uninitialize
  • Validate
  • RegisteredValidators

GetIdentity Method

Assembly: EPiServer.Data (in EPiServer.Data.dll) Version: 8.0.0

Extracts the identity from the object if it has one.

Syntax:

C#
public static Identity GetIdentity(
	this Object value
)

Parameters:

Remarks

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

See also:

IdentityObjectExtensions Class
IdentityObjectExtensions..::..IdentityObjectExtensions Members
EPiServer.Data Namespace

About Episerver

  • episerver.com
  • Episerver certification
  • Job openings
  • License center
  • Privacy statement

Community

  • Blogs
  • Forums
  • Articles
  • Terms of use
  • EMVP program

Learning resources

  • Technical overview
  • Learning path Episerver CMS
  • Developer guides
  • User guide
  • Video tutorials
  • Episerver GitHub
  • Episerver Education

Contact

Episerver Support

See the Support page for contact information.

Feedback on Episerver World

If you’d like to give feedback about this site, please click here. Thank you very much!
© Episerver 2019 │ About Episerver World