Skip to content

Model class

misonou edited this page Sep 14, 2016 · 4 revisions

The library provides a way to describe your content with model class that represents content types and columns in SharePoint sites.

Compared with other SharePoint frameworks, the library delivers extra features such as:

  • Code-first content type design
  • Supports content type inheritance
  • Supports model interfacing
  • Ability to handle item events per content type

Creating the first model class

To create a model class it is just as simple as decorating a derived class from SPModel with an SPContentTypeAttribute attribute.

[SPContentType("5A132C01F46341319BBA6C776A2D9D32", "My Item")]
public class MyItem : SPModel {
}

Continue reading on Defining content type.