Interface IContentType
Represents a Content Type information (the schema) used for IEntity objects.
[PublicApi]
public interface IContentType : IAppIdentityLight, IHasMetadata
- Inherited Members
Properties
Attributes
All Attribute Definitions
IEnumerable<IContentTypeAttribute> Attributes { get; }
Property Value
Remarks
As of v21, the order of attributes is preserved as defined in the content-type definition. Previously you had to manually sort using the .SortOrder property of the attribute.
Id
Get the id of the Content Type as stored in the DB. You usually don't need this!
int Id { get; }
Property Value
IsDynamic
Determines if the data for this type is dynamic (spontaneously created) or real an EAV (split into sql-tables) or json somewhere To detect if it's just a global json-type, find out what repository the type is from (RepositoryType)
bool IsDynamic { get; }
Property Value
this[string]
A simple indexer to get an attribute
IContentTypeAttribute? this[string fieldName] { get; }
Parameters
fieldNamestring
Property Value
- IContentTypeAttribute
The IContentTypeAttribute of the field name or
nullif not found
Metadata
Get the metadata for this content-type
IMetadata Metadata { get; }
Property Value
Remarks
The metadata is either already prepared, from the same app, or from a remote app
Name
Gets the Display Name of the Content Type
string Name { get; }
Property Value
NameId
A unique id/name of the content-type. Previously called StaticName.
string NameId { get; }
Property Value
Remarks
New in v13
RepositoryAddress
Information / ID / URL to this content-type where it was stored in the repository
string RepositoryAddress { get; }
Property Value
RepositoryType
Information where the Content-Type was stored (file system, DB, etc.)
RepositoryTypes RepositoryType { get; }
Property Value
Scope
Get the scope of the Content Type (like sections in a DB)
string Scope { get; }
Property Value
Methods
Is(string?)
Check if this type is the same as a name given. Will check both the name and the static name
bool Is(string? name)
Parameters
namestring