Create a object of class which extends from ContentPartVersionRecord

Topics: Writing modules
Apr 17, 2013 at 8:57 AM
Edited Apr 17, 2013 at 8:59 AM
Hi all,

I have a class which extends from ContentPartVersionRecord.

public class OptionalInformation : ContentPartVersionRecord
{
    public virtual string Label { get; set; }
    public virtual string Value { get; set; }
    public virtual string Guid { get; set; }
    public virtual bool Active { get; set; }
}

When i try to create an object of it. I want to set 2 fields ContentItemRecord and ContentItemVersionRecord null. but it throws an exception.
I use repository pattern to do that action.
Please give some ways to resolve it.

Thanks,
Hien Phan
Coordinator
Apr 22, 2013 at 7:01 AM
Why?