---
title: "Class FluentEntityDefinition"
slug: "fluent-sdk--stylelabs.m.sdk.fluent.models.fluententitydefinition"
abstract: ""
---
# Class FluentEntityDefinition

Defines the fluent entity definition type.

## Inheritance

object

FluentEntityDefinition

## Namespace: StylelabsStylelabs.MSdkFluentModels

## Assembly: Stylelabs.M.Sdk.Fluent.dll

## Syntax

```csharp
public class FluentEntityDefinition
```

## Constructors

### FluentEntityDefinition(IEntityDefinition, IEntityDefinitionsClient)

Initializes a new instance of the [FluentEntityDefinition](https://doc.sitecore.com/ch/en/developers/api-reference/fluent-sdk--stylelabs.m.sdk.fluent.models.fluententitydefinition.html) class.

#### Declaration

```csharp
public FluentEntityDefinition(IEntityDefinition entityDefinition, IEntityDefinitionsClient entityDefinitionsClient)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| [IEntityDefinition](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.contracts.base.ientitydefinition.html) | entityDefinition | The [IEntityDefinition](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.contracts.base.ientitydefinition.html). |
| [IEntityDefinitionsClient](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.clients.ientitydefinitionsclient.html) | entityDefinitionsClient | The [IEntityDefinitionsClient](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.clients.ientitydefinitionsclient.html). |

## Properties

### DisplayTemplate

#### Declaration

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

#### Property Value

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

### Id

#### Declaration

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

#### Property Value

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

### IsManualSortingAllowed

#### Declaration

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

#### Property Value

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

### IsNew

#### Declaration

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

#### Property Value

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

### IsPathEnabledDefinition

#### Declaration

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

#### Property Value

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

### IsSystemOwned

#### Declaration

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

#### Property Value

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

### IsTaxonomyItemDefinition

#### Declaration

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

#### Property Value

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

### Labels

#### Declaration

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

#### Property Value

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

### Name

#### Declaration

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

#### Property Value

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

### Object

Gets the [IEntityDefinition](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.contracts.base.ientitydefinition.html).

#### Declaration

```csharp
public IEntityDefinition Object { get; }
```

#### Property Value

| Type | Description |
| --- | --- |
| [IEntityDefinition](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.contracts.base.ientitydefinition.html) |  |

## Methods

### Delete()

Deletes the [IEntityDefinition](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.contracts.base.ientitydefinition.html).

#### Declaration

```csharp
public void Delete()
```

### DeleteMemberGroup(string)

Deletes a [IMemberGroup](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.contracts.base.imembergroup.html).

#### Declaration

```csharp
public FluentEntityDefinition DeleteMemberGroup(string name)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| string | name | The name of the group. |

#### Returns

| Type | Description |
| --- | --- |
| [FluentEntityDefinition](https://doc.sitecore.com/ch/en/developers/api-reference/fluent-sdk--stylelabs.m.sdk.fluent.models.fluententitydefinition.html) | The [IEntityDefinition](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.contracts.base.ientitydefinition.html). |

### DeleteRelation(string)

Deletes a [RelationDefinition](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.models.base.relationdefinition.html).

#### Declaration

```csharp
public FluentEntityDefinition DeleteRelation(string name)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| string | name | The name of the relation definition. |

#### Returns

| Type | Description |
| --- | --- |
| [FluentEntityDefinition](https://doc.sitecore.com/ch/en/developers/api-reference/fluent-sdk--stylelabs.m.sdk.fluent.models.fluententitydefinition.html) | The [FluentEntityDefinition](https://doc.sitecore.com/ch/en/developers/api-reference/fluent-sdk--stylelabs.m.sdk.fluent.models.fluententitydefinition.html). |

### MemberGroup(string, Action<FluentMemberGroup>)

Gets a member group.

#### Declaration

```csharp
public FluentEntityDefinition MemberGroup(string name, Action<FluentMemberGroup> operations = null)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| string | name | The name of the member group. |
| Action<>[FluentMemberGroup](https://doc.sitecore.com/ch/en/developers/api-reference/fluent-sdk--stylelabs.m.sdk.fluent.models.fluentmembergroup.html) | operations | The operations to apply to the group. |

#### Returns

| Type | Description |
| --- | --- |
| [FluentEntityDefinition](https://doc.sitecore.com/ch/en/developers/api-reference/fluent-sdk--stylelabs.m.sdk.fluent.models.fluententitydefinition.html) | The [FluentEntityDefinition](https://doc.sitecore.com/ch/en/developers/api-reference/fluent-sdk--stylelabs.m.sdk.fluent.models.fluententitydefinition.html). |

### NewMemberGroup(string, Action<FluentMemberGroup>)

Adds a new [MemberGroup(string, Action<FluentMemberGroup>)](https://doc.sitecore.com/ch/en/developers/api-reference/fluent-sdk--stylelabs.m.sdk.fluent.models.fluententitydefinition.html).

#### Declaration

```csharp
public FluentEntityDefinition NewMemberGroup(string name, Action<FluentMemberGroup> initializer = null)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| string | name | The name of the group. |
| Action<>[FluentMemberGroup](https://doc.sitecore.com/ch/en/developers/api-reference/fluent-sdk--stylelabs.m.sdk.fluent.models.fluentmembergroup.html) | initializer | The member group initializer. |

#### Returns

| Type | Description |
| --- | --- |
| [FluentEntityDefinition](https://doc.sitecore.com/ch/en/developers/api-reference/fluent-sdk--stylelabs.m.sdk.fluent.models.fluententitydefinition.html) | The [FluentEntityDefinition](https://doc.sitecore.com/ch/en/developers/api-reference/fluent-sdk--stylelabs.m.sdk.fluent.models.fluententitydefinition.html). |

### Reload()

Reloads the [IEntityDefinition](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.contracts.base.ientitydefinition.html).

#### Declaration

```csharp
public FluentEntityDefinition Reload()
```

#### Returns

| Type | Description |
| --- | --- |
| [FluentEntityDefinition](https://doc.sitecore.com/ch/en/developers/api-reference/fluent-sdk--stylelabs.m.sdk.fluent.models.fluententitydefinition.html) | The [FluentEntityDefinition](https://doc.sitecore.com/ch/en/developers/api-reference/fluent-sdk--stylelabs.m.sdk.fluent.models.fluententitydefinition.html). |

### Save()

Saves an [IEntityDefinition](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.contracts.base.ientitydefinition.html).

#### Declaration

```csharp
public FluentEntityDefinition Save()
```

#### Returns

| Type | Description |
| --- | --- |
| [FluentEntityDefinition](https://doc.sitecore.com/ch/en/developers/api-reference/fluent-sdk--stylelabs.m.sdk.fluent.models.fluententitydefinition.html) | An [FluentEntityDefinition](https://doc.sitecore.com/ch/en/developers/api-reference/fluent-sdk--stylelabs.m.sdk.fluent.models.fluententitydefinition.html). |

### Extension Methods

[FluentEntityDefinitionExtensions.AssertMemberGroup(FluentEntityDefinition, string, string)](https://doc.sitecore.com/ch/en/developers/api-reference/fluent-sdk--stylelabs.m.sdk.fluent.testing.extensions.fluententitydefinitionextensions.html)

[FluentEntityDefinitionExtensions.AssertRelation(FluentEntityDefinition, string, RelationRole, string)](https://doc.sitecore.com/ch/en/developers/api-reference/fluent-sdk--stylelabs.m.sdk.fluent.testing.extensions.fluententitydefinitionextensions.html)
