I'm building a core engine for my blog and would like to be able to extend it very easily. At the moment my code looks like this:
[Table(Name = "dbo.ContentItem")]
[InheritanceMapping(Code = "MyNameSpace.Items.SysRoot", Type = typeof(SysRoot), IsDefault = true)]
[InheritanceMapping(Code = "MyNameSpace.Items.SysRecycleBin", Type = typeof(SysRecycleBin))]
public partial class ContentItem : ICloneable, INotifyPropertyChanging, INotifyPropertyChanged {
// some code here
}
The code above is in my core project and and I would like to map new pagetypes in my blog project by for example adding the inheritancemapping attribute on a class like this:
[InheritanceMapping(Code = "MyNamespace.Blog.Items.BlogPostContainer", Type = typeof(BlogPostConntainer))]
public partial class BlogPostContainer : ContentItem {
// some code here
}
This does not work so I wonder if anyone has a solution for this problem? Maybe it's possible to write the mapping in an external xml file to get the inheritance between projects to work?