Writing entity classes

There are two base entity classes which need to be inherited for custom items:
Item used to present list items
[ContentType]
public class Item
{
    public virtual int Id { get; internal set; }
    public virtual string Title { get; set; }
    public virtual DateTime Created { get; internal set; }
    public virtual User Author { get; internal set; }
    public virtual DateTime Modified { get; internal set; }
    public virtual User Editor { get; internal set; }
    public virtual Version Version { get; internal set; }
    public virtual Guid Guid { get; internal set; }
}

Document used to present files in document library
[ContentType]
public class Document : Item
{
    [NotField]
    public virtual string Name { get; set; }

    [NotField]
    public virtual byte[] Content { get; set; }

    [NotField]
    public virtual long Size { get; internal set; }

    [NotField]
    public virtual string Icon { get; internal set; }

    [NotField]
    public virtual string Url { get; internal set; }

    [NotField]
    public virtual string Folder { get; set; }

    [NotField]
    public bool RenameIfExists { get; set; }
}

Last edited Aug 10, 2012 at 7:20 AM by devi_ous, version 3

Comments

No comments yet.