Virtual Happy Hour this month, Jun 28, we'll be getting a sneak preview at our soon to launch SaaS CMS!

Try our conversational search powered by Generative AI!

solution for DataFactory.Instance.CreatingPage & DataFactory.Instance.PublishingPage in Episerver v11


Hi Team,

We are doing migration for Epi CMS from 7.5 to 11 and facing issue in below code:

DataFactory.Instance.CreatingPage += MyFunction;
DataFactory.Instance.PublishingPage += MyFunction;

now in v11 , these EventHandler are not part of DataFactory class and i was wondering , how can it is handled in latest version of CMS.

Dec 05, 2017 17:05

Look for `EPiServer.Core.IContentEvents`

Dec 05, 2017 17:31

While the answer from Valdis is correct, it is worth noting that you should be using IContentRepository instead of DataFactory these days. Episerver now is all about interfaces & dependency injection.

Dec 05, 2017 18:06

:) "all".. there are still some places in framework that needs to be taken care of ;) no offense here..

Dec 05, 2017 18:11
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.