Table of Contents

Entities (Data, Records, Items)

This explains Entities aka Data Items. For an overview check out Understanding Data....


Every thing, record or object in 2sxc is called an Entity. So if you have a list of Book objects, then each Book is an entity.

Many other systems use the term Record, Content Item, Item or Object.

Tip

Before you start: Remember that you usually don't need this if you are creating Razor templates or WebApi - for that, you want to read Dynamic Entity Objects.

Data Model: EAV+D = Entity-Attribute-Value + Dimension

EAV stands for Entity, Attribute, Value The D stands for Dimension, it says what Dimension (Language) a Value is for

How it Works

Each Entity has many fields, some containing text, numbers etc. The fields an Entity can have is defined in the Content-Type, so each Entity is like a record of that type.

This basic principle is used everywhere in 2sxc. For example, all these things are Entities:

  • Simple Content items in the Content-App are entities containing a title, body and image
  • View configurations are entities containing name, thumbnail, template-name etc.
  • Blog posts in the Blog App are entities containing around 20 fields
  • Tag items in the Blog App are also entities
  • Anything you define in your apps will result in entities

Multilanguage Data

Each value can also be multilanguage, so there are actually many Descriptions in a multi-language product Entity.

Relationships

Entities are much more than just records, as they can have relationships.

Input Forms and Fields (like WYSIWYG)

The input mask is automatically generated from the Content-Type. Based on the specifications, it will generate the correct Input-Field like a simple text field, a multiline text field, a WYSIWYG or even a file-uploader.

History

  1. Introduced in 2sxc 1.0