Follow

Create a BusinessObject

API Reference

A BusinessObject is a container that holds the data entity you are creating.  There is no need to interact with the database.  All CRUD and versioning happens automatically when you inherit from BusinessObject<self>

Any public property with a GET/SET will automatically be saved.

Excluding a public property is possible if you decorate the property with [XMLIgnore].

 

Override methods (Manditory)

SetSummaryDataRow -> Used to create the data expression that will be used to fill the list tool for managing the data add/edit screen.

example usage:

       protected override void SetSummaryDataRow()
        {
            AddSummaryDataRow("Display", PositionTitle);            
        }

Override methods (optional)

 

SetSearchableProperties -> used to allow data to be indexed for performance benefits during searching and display

example usage:

       protected override void SetSearchableProperties()
        {
            AddSearchableProperty("Title", this.PositionTitle);
        }

Validate - > used to validate the data at any particular action point.  Failing the data validation will cause the event to not fire.

PreSaveDraft-> Called directly before the data is saved as a draft

PostSaveDraft-> Called directly after the data is saved as a draft

 

PrePublish -> Called directly before the data is published

PostPublish -> Called directly after the data is published

 

PreUnpublish-> Called directly before the data is unpublished

PostUnpublish-> Called directly after the draft is unpublished

 

PreDeleteRecord-> Called directly before the entire record is deleted

ProstDeleteRecord-> Called directly after the entire record is deleted

Sample:

Create a BusinessObject and save to the correct folder

 

Sample News Article and News Category Classes

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments