Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

smithsson68@gmail.com
Feb 15, 2011
  4223
(1 votes)

Dynamic Data Store : Easier Store Creation and Remapping (for CMS 6 R1)

As mentioned in my previous blog entry

Dynamic Data Store : Easier Store Creation and Remapping, I have developed an open-source version of the code which works with CMS 6 R1 (and Community 4 R1).

The main differences are:

  • The DdsAutoCreateAttribute class should be used instead of the EPiServerDataStoreAttribute / AutomaticallyCreateStore property
  • The DdsAutoRemapAttribute class should be used instead of the EPiServerDataStoreAttribute / AutomaticallyRemapStore property
  • The DdsAutoPropertyRenameAttribute class should be used instead of the EPiServerDataPropertyRenameAttribute
  • The namespace to include for the System.Type extensions (GetStore(), CreateStore(), GetOrCreateStore()) is EPiServer.Samples.DdsExtensions

Unlike the CMS 6 R2 built-in version, this version uses an initialization module which runs on application start to scan for the above attributes. What this means is that it will add some time to your site’s start-up time and if you exclude your assemblies (containing your Types decorated with the attributes) from the assembly scanning list in the EPiServerFramework.config (see this blog entry for more info about this) then your Types will not be found by the scan and therefore their stores will not be auto created or auto mapped.

Also note that the initialization module is coded to throw an exception if run against a CMS 6 R2 site, i.e. a version of the EPiServer.Data assembly with version number 6.2.217.x or higher. This is because you should use the built-in functionality supplied by the EPiServer.Data assembly is this case.

The source code and example of how to use it can be found here on the Code section of EPiServer World.

A binary ready to drop in the bin folder can be found here.

Enjoy!

Feb 15, 2011

Comments

Please login to comment.
Latest blogs
Solving the mystery of high memory usage

Sometimes, my work is easy, the problem could be resolved with one look (when I’m lucky enough to look at where it needs to be looked, just like th...

Quan Mai | Apr 22, 2024 | Syndicated blog

Search & Navigation reporting improvements

From version 16.1.0 there are some updates on the statistics pages: Add pagination to search phrase list Allows choosing a custom date range to get...

Phong | Apr 22, 2024

Optimizely and the never-ending story of the missing globe!

I've worked with Optimizely CMS for 14 years, and there are two things I'm obsessed with: Link validation and the globe that keeps disappearing on...

Tomas Hensrud Gulla | Apr 18, 2024 | Syndicated blog

Visitor Groups Usage Report For Optimizely CMS 12

This add-on offers detailed information on how visitor groups are used and how effective they are within Optimizely CMS. Editors can monitor and...

Adnan Zameer | Apr 18, 2024 | Syndicated blog

Azure AI Language – Abstractive Summarisation in Optimizely CMS

In this article, I show how the abstraction summarisation feature provided by the Azure AI Language platform, can be used within Optimizely CMS to...

Anil Patel | Apr 18, 2024 | Syndicated blog

Fix your Search & Navigation (Find) indexing job, please

Once upon a time, a colleague asked me to look into a customer database with weird spikes in database log usage. (You might start to wonder why I a...

Quan Mai | Apr 17, 2024 | Syndicated blog