Table of Contents

Understanding Data...

you are here (click to zoom) - discover the stack

Data in 2sxc covers various aspects:

  1. Data as a developers sees it - as tables of items / Entities
  2. Content as an editor sees it - basically bundles of text/image shown on a specific page
  3. Content Presentation Settings which configure how the content should be shown for each item
  4. Settings at App-Level
  5. Language Resources at App-level for multilanguage output
  6. Assets (images, documents) belonging to this each data-item / Entity

This kind of data is usually used to:

  1. Show in the browser with HTML
  2. Show in the browser in a JS-application or SPA
  3. Edit in the browser
  4. Export / import data
  5. Combine with other data
  6. Use in other sites or mobile apps with a headless backend

This kind of data can be used in many ways. Let's start by looking where this fits in the stack:

you are here (click to zoom) - discover the stack


The Edit UIs are automatically generated based on the Content-Type Schema which says what fields each kind of data has.

App Data Model

Every App contains Content-Types and Entities - like this:

  • Content Types are the schema, they define what fields an entity has.
  • Entities are the data-items, they contain the content.

Let's look at each piece in detail.


Content-types are the Schema. The are the rules which say that a Person has a FirstName, Photo and Birthday etc. An App usually has a lot of Content-Types.

👉 Content-Type (Schema/Object-Type) 👉 Content-Type Fields

Global / Shared Types

Usually a Content-Type is part of the App and only available inside that App. In rare cases you may have many sites (Portals) or many Apps which need the same Content-Type. In this case it's smarter to store this in a shared location.

👉 App Shared "Ghost" Content-Types (⚠)

Global-Types are Content-Types which are stored in a system folder so they can be used in all Apps of an installation.

👉 Global Content-Types (⚠)

Entities / Content-Items

Entities are Dynamic Data Items. They always belong to a Content-Type and have all the fields specified in that Content-Type. This makes them very dynamic.

  • A Person has different fields than a BlogPost
  • All the Values in an Entity can also be multi-language by default

👉 Entities (Data, Records, Items)

Assets (Images / Documents)

Assets come in 2 Flavors: Private Assets and Shared Assets.

  • Private Assets By default, assets uploaded in the UI belong to the Entity and to the Field they were added to. So the photo daniel.jpg belongs to the Field ProfilePhoto of the Entity Person #5020.
  • Shared Assets If the editor expects to re-use an asset elsewhere and if the Content-Type configuration allows this, then the asset can also be stored in a shared location.

👉 Content Assets / Images / Documents

ADAM - the Automatic Digital Asset Manager

ADAM is a subsystem of 2sxc. It's responsible for managing the files and storing them in a way that assigns Private Assets to the Entities and Fields they belong to.

👉 ADAM - Automatic Digital Asset Management

External Data

External Data can come from anywhere. Here are some common scenarios:

  1. SQL data coming from the Dnn database or from another DB
  2. CSV data from a file which an editor updates from time to time
  3. SharePoint document lists or tables
  4. JSON data from another REST WebService

External Data is retrieved using one of the following methods:

  1. a VisualQuery which was configured to get / filter / sort this data
  2. C# code creating DataSource objects to retrieve this data
  3. C# code using standard .net APIs to get / use this data

Once the data is retrieved it can be used in Templates, WebAPIs, JavaScript and SPAs.

More Advanced Topics

  1. Entities and Dynamic Entities
  2. Using Entities as Content or as Data
  3. Content Lists of Entities
  4. VisualQuery
  5. Data Sources
  6. Headless APIs
  7. Metadata