---
title: "Interface IEntityDefinition"
slug: "sdk--stylelabs.m.sdk.contracts.base.ientitydefinition"
abstract: ""
---
# Interface IEntityDefinition

Represents a data schema / domain model for entities.

## Inherited Members

[IResource.CreatedBy](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.contracts.base.iresource.html)

[IResource.CreatedOn](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.contracts.base.iresource.html)

[IResource.ModifiedBy](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.contracts.base.iresource.html)

[IResource.ModifiedOn](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.contracts.base.iresource.html)

## Namespace: StylelabsStylelabs.MSdkStylelabs.M.Sdk.ContractsBase

## Assembly: Stylelabs.M.Sdk.dll

## Syntax

```csharp
public interface IEntityDefinition : IResource
```

## Properties

### DisplayTemplate

Gets or sets the language agnostic display format for entities of this definition. Formatted as follows: `{PropertyName}`.

#### Declaration

```csharp
string DisplayTemplate { get; set; }
```

#### Property Value

| Type | Description |
| --- | --- |
| string |  |

### Id

Gets the id of this definition. This is an automatically assigned unique and strictly positive number identifying the entity definition. null if has not been created.

#### Declaration

```csharp
long? Id { get; }
```

#### Property Value

| Type | Description |
| --- | --- |
| long |  |

### IsManualSortingAllowed

Gets or sets a value indicating whether the items of this definition can be sorted manually (UI related).

#### Declaration

```csharp
bool IsManualSortingAllowed { get; set; }
```

#### Property Value

| Type | Description |
| --- | --- |
| bool |  |

### IsNew

Gets a value indicating whether the entity definition is new (id is null).

#### Declaration

```csharp
bool IsNew { get; }
```

#### Property Value

| Type | Description |
| --- | --- |
| bool |  |

### IsPathEnabledDefinition

Gets or sets a value indicating whether entities of this entity definition can be part of the so called paths, which are technically UI breadcrumbs. Example use cases are taxonomy entity definitions or Sitecore Content Hub Project block entity definitions.

#### Declaration

```csharp
bool IsPathEnabledDefinition { get; set; }
```

#### Property Value

| Type | Description |
| --- | --- |
| bool |  |

### IsSystemOwned

Gets or sets a value indicating whether the entity definition is owned by the system and cannot be modified or deleted by the regular users.

#### Declaration

```csharp
bool IsSystemOwned { get; set; }
```

#### Property Value

| Type | Description |
| --- | --- |
| bool |  |

### IsTaxonomyItemDefinition

Gets or sets a value indicating whether entities of this entity definition are taxonomy items, they can be used as a search facet on the web pages.

#### Declaration

```csharp
bool IsTaxonomyItemDefinition { get; set; }
```

#### Property Value

| Type | Description |
| --- | --- |
| bool |  |

### Labels

Gets a collection of the culture specific definition labels. Never returns null.

#### Declaration

```csharp
IDictionary<CultureInfo, string> Labels { get; }
```

#### Property Value

| Type | Description |
| --- | --- |
| IDictionary<, >CultureInfostring |  |

### MemberGroups

Gets the collection of member groups. Never returns null.

#### Declaration

```csharp
IList<IMemberGroup> MemberGroups { get; }
```

#### Property Value

| Type | Description |
| --- | --- |
| IList<>[IMemberGroup](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.contracts.base.imembergroup.html) |  |

### Name

Gets the unique and language agnostic name of the entity definition. It should be handled as case sensitive.

#### Declaration

```csharp
string Name { get; }
```

#### Property Value

| Type | Description |
| --- | --- |
| string |  |

## Methods

### GetPropertyDefinition(string)

Get the definition of the specified property.

#### Declaration

```csharp
IPropertyDefinition GetPropertyDefinition(string name)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| string | name | Name of the property. |

#### Returns

| Type | Description |
| --- | --- |
| [IPropertyDefinition](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.contracts.base.ipropertydefinition.html) | The property definition or null if it was not found. |

### GetPropertyDefinition<T>(string)

Generic version of [GetPropertyDefinition(string)](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.contracts.base.ientitydefinition.html).

#### Declaration

```csharp
T GetPropertyDefinition<T>(string name) where T : IPropertyDefinition
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| string | name | Name of the property. |

#### Returns

| Type | Description |
| --- | --- |
| T | The property definition or null if it was not found. |

#### Type Parameters

| Name | Description |
| --- | --- |
| T | A property (sub)type. |

### GetPropertyDefinitions()

Gets all property definitions.

#### Declaration

```csharp
IList<IPropertyDefinition> GetPropertyDefinitions()
```

#### Returns

| Type | Description |
| --- | --- |
| IList<>[IPropertyDefinition](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.contracts.base.ipropertydefinition.html) | A list of all property definitions (never null). |

### GetRelationDefinition(string, RelationRole)

Get the definition of the specified relation.

#### Declaration

```csharp
IRelationDefinition GetRelationDefinition(string name, RelationRole role)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| string | name | Name of the relation. |
| [RelationRole](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.framework.essentials.loadoptions.relationrole.html) | role | Relation role. |

#### Returns

| Type | Description |
| --- | --- |
| [IRelationDefinition](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.contracts.base.irelationdefinition.html) | The relation definition or null if it was not found. |

### GetRelationDefinitions()

Gets all relation definitions.

#### Declaration

```csharp
IList<IRelationDefinition> GetRelationDefinitions()
```

#### Returns

| Type | Description |
| --- | --- |
| IList<>[IRelationDefinition](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.contracts.base.irelationdefinition.html) | A list of all relation definitions (never null). |
