Class DataModelAttribute
BETA / WIP: Mark DataModel objects/interfaces and specify what ContentType they are for.
[InternalApi_DoNotUse_MayChangeWithoutNotice("may change or rename at any time")]
public class DataModelAttribute : Attribute
- Inheritance
-
objectAttributeDataModelAttribute
Remarks
Typical use is for custom data such as classes inheriting from CustomItem which takes an entity and then provides a strongly typed wrapper around it.
History: New / WIP in v19.01
Fields
ForAnyContentType
public const string ForAnyContentType = "*"
Field Value
Properties
ForContentTypes
Determines which content-type names are expected when converting to this data model.
public string ForContentTypes { get; init; }
Property Value
Remarks
Usually this is checked when converting Entities to the custom data model. If it doesn't match, will then throw an error.
Typically just one value, such as "Article" or "Product". But it will also support "*" for anything, or a comma-separated list of content-type names.
History: WIP 19.01
Remarks
Just custom remarks, no technical functionality.
public string Remarks { get; init; }
Property Value
StreamNames
public string StreamNames { get; init; }