Hi,
I'm trying to use the Code First approach to create some custom item types. I cannot not find any documentation on this - only the item-based structure preview video.
My item types inherit from ItemEntry (Item is sealed) and the item types are created in Dynamicweb when the application loads. However the constructor, Save, Delete, DeserializeFrom and SerializeTo are never called, which means that my item type class is ONLY used for creating item type definition at application load and is not used when creating and editing items of this type?
I thought that I could override the methods on my item type class, but apparently thats not the way to do it. Are there any notifications that I can subscribe to?
Am I missing something here?
using Dynamicweb.Content.Items; using Dynamicweb.Content.Items.Annotations; public class Article : ItemEntry { // Never called. public Article() { } public string Headline { get; set; } [RichText] public string Text { get; set; } // Never called. public override void Save() { base.Save(); } // Never called. public override void Delete() { base.Delete(); } // Never called. public override void DeserializeFrom(System.Collections.Generic.IDictionary<string, object> dictionary) { base.DeserializeFrom(dictionary); } // Never called. public override void SerializeTo(System.Collections.Generic.IDictionary<string, object> dictionary) { base.SerializeTo(dictionary); } }