Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
Each data structure saved in the Dynamic Data Store is given an identity. This identity is represented by the EPiServer.Data.Identity class, which contains the following parts:
The implementer of a .NET class that will be stored in the Dynamic Data Store can choose to explicitly manage the ID the objects get when stored. This can be done in the following ways:
See the UsingManagedIdentity class in the DDS sample project for examples of specific identity management.
The Dynamic Data Store supports POCO objects. When POCO objects are stored in the Dynamic Data Store, special care needs to be taken when saving (updating) existing objects. Because the Dynamic Data Store does not have an ID it can use to determine if an object is new or existing, it relies on state information held for objects that have been previously loaded through the same instance of the Dynamic Data Store when saving them back.
See the UsingImplicitidentity class in the DDS sample project for examples of implicit identity management.
By default, dates are stored as unspecified, which means it is the responsibility of the data class to convert to local or UTC time.
[New in CMS.Core 9.1] You can change this behaviour by using the EPiServerDataStoreAttribute, for example: [EPiServerDataStore(DatabaseDateTimeKind = DatabaseDateTimeKind.Utc)]. When this is activated, all dates and times are automically converted when loading and saving. When using LINQ, the actual date and time stored in the database is used, no automatic conversion takes place. See also Storing UTC date and time in database.
Last updated: Jan 05, 2016