---
title: "Class FluentEntity"
slug: "fluent-sdk--stylelabs.m.sdk.fluent.models.fluententity"
abstract: ""
---
# Class FluentEntity

Defines the fluent entity type.

## Inheritance

object

FluentEntity

[FluentUser](https://doc.sitecore.com/ch/en/developers/api-reference/fluent-sdk--stylelabs.m.sdk.fluent.models.fluentuser.html)

## Namespace: StylelabsStylelabs.MSdkFluentModels

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

## Syntax

```csharp
public class FluentEntity
```

## Constructors

### FluentEntity(IEntity, IEntitiesClient, IEntityLoadConfiguration)

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

#### Declaration

```csharp
public FluentEntity(IEntity entity, IEntitiesClient entities, IEntityLoadConfiguration entityLoadConfiguration = null)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| [IEntity](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.contracts.base.ientity.html) | entity | The entity. |
| [IEntitiesClient](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.clients.ientitiesclient.html) | entities | The entities. |
| [IEntityLoadConfiguration](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.framework.essentials.loadconfigurations.ientityloadconfiguration.html) | entityLoadConfiguration | The load configuration. |

## Properties

### Cultures

#### Declaration

```csharp
public IReadOnlyList<CultureInfo> Cultures { get; }
```

#### Property Value

| Type | Description |
| --- | --- |
| IReadOnlyList<>CultureInfo |  |

### DefinitionName

#### Declaration

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

#### Property Value

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

### Id

#### Declaration

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

#### Property Value

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

### Identifier

#### Declaration

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

#### Property Value

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

### InheritsSecurity

#### Declaration

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

#### Property Value

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

### IsNew

#### Declaration

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

#### Property Value

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

### IsPathRoot

#### Declaration

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

#### Property Value

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

### IsSystemOwned

#### Declaration

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

#### Property Value

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

### this\[string, CultureInfo\]

Gets the property value in the specified culture.

#### Declaration

```csharp
public object this[string name, CultureInfo cultureInfo] { get; set; }
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| string | name | The property name. |
| CultureInfo | cultureInfo | The culture info. |

#### Property Value

| Type | Description |
| --- | --- |
| object |  |

### this\[string\]

Gets the property value.

#### Declaration

```csharp
public object this[string name] { get; set; }
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| string | name | The property name. |

#### Property Value

| Type | Description |
| --- | --- |
| object |  |

### LockedBy

#### Declaration

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

#### Property Value

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

### LockedOn

#### Declaration

```csharp
public DateTime? LockedOn { get; }
```

#### Property Value

| Type | Description |
| --- | --- |
| DateTime |  |

### Object

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

#### Declaration

```csharp
public IEntity Object { get; set; }
```

#### Property Value

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

### Version

#### Declaration

```csharp
public long Version { get; }
```

#### Property Value

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

## Methods

### Child(string, Action<IParentToOneChildRelation>)

#### Declaration

```csharp
public FluentEntity Child(string relationName, Action<IParentToOneChildRelation> relationDelegate)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| string | relationName |  |
| Action<>[IParentToOneChildRelation](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.contracts.base.iparenttoonechildrelation.html) | relationDelegate |  |

#### Returns

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

### Children(string, Action<IParentToManyChildrenRelation>)

#### Declaration

```csharp
public FluentEntity Children(string relationName, Action<IParentToManyChildrenRelation> relationDelegate)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| string | relationName |  |
| Action<>[IParentToManyChildrenRelation](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.contracts.base.iparenttomanychildrenrelation.html) | relationDelegate |  |

#### Returns

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

### Delete()

#### Declaration

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

### GetPropertyValue<T>(string, Action<T>)

#### Declaration

```csharp
public FluentEntity GetPropertyValue<T>(string name, Action<T> propertyValueAccessor)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| string | name |  |
| Action<> | propertyValueAccessor |  |

#### Returns

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

#### Type Parameters

| Name | Description |
| --- | --- |
| T |  |

### GetPropertyValue<T>(string, CultureInfo, Action<T>)

#### Declaration

```csharp
public FluentEntity GetPropertyValue<T>(string name, CultureInfo culture, Action<T> propertyValueAccessor)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| string | name |  |
| CultureInfo | culture |  |
| Action<> | propertyValueAccessor |  |

#### Returns

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

#### Type Parameters

| Name | Description |
| --- | --- |
| T |  |

### Parent(string, Action<IChildToOneParentRelation>)

#### Declaration

```csharp
public FluentEntity Parent(string relationName, Action<IChildToOneParentRelation> relationDelegate)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| string | relationName |  |
| Action<>[IChildToOneParentRelation](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.contracts.base.ichildtooneparentrelation.html) | relationDelegate |  |

#### Returns

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

### Parents(string, Action<IChildToManyParentsRelation>)

#### Declaration

```csharp
public FluentEntity Parents(string relationName, Action<IChildToManyParentsRelation> relationDelegate)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| string | relationName |  |
| Action<>[IChildToManyParentsRelation](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.contracts.base.ichildtomanyparentsrelation.html) | relationDelegate |  |

#### Returns

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

### Reload()

#### Declaration

```csharp
public FluentEntity Reload()
```

#### Returns

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

### Save()

#### Declaration

```csharp
public FluentEntity Save()
```

#### Returns

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

### SetPropertyValue(string, CultureInfo, object)

#### Declaration

```csharp
public FluentEntity SetPropertyValue(string name, CultureInfo culture, object value)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| string | name |  |
| CultureInfo | culture |  |
| object | value |  |

#### Returns

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

### SetPropertyValue(string, object)

#### Declaration

```csharp
public FluentEntity SetPropertyValue(string name, object value)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| string | name |  |
| object | value |  |

#### Returns

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

### Extension Methods

[FluentEntityExtensions.AssertPropertyEmpty(FluentEntity, string, CultureInfo)](https://doc.sitecore.com/ch/en/developers/api-reference/fluent-sdk--stylelabs.m.sdk.fluent.testing.extensions.fluententityextensions.html)

[FluentEntityExtensions.AssertPropertyEmpty(FluentEntity, string)](https://doc.sitecore.com/ch/en/developers/api-reference/fluent-sdk--stylelabs.m.sdk.fluent.testing.extensions.fluententityextensions.html)

[FluentEntityExtensions.AssertPropertyEqual<T>(FluentEntity, string, T)](https://doc.sitecore.com/ch/en/developers/api-reference/fluent-sdk--stylelabs.m.sdk.fluent.testing.extensions.fluententityextensions.html)

[FluentEntityExtensions.AssertPropertyEqual<T>(FluentEntity, string, CultureInfo, T)](https://doc.sitecore.com/ch/en/developers/api-reference/fluent-sdk--stylelabs.m.sdk.fluent.testing.extensions.fluententityextensions.html)

[FluentEntityExtensions.AssertPropertyGreater<T>(FluentEntity, string, T)](https://doc.sitecore.com/ch/en/developers/api-reference/fluent-sdk--stylelabs.m.sdk.fluent.testing.extensions.fluententityextensions.html)

[FluentEntityExtensions.AssertPropertyGreater<T>(FluentEntity, string, CultureInfo, T)](https://doc.sitecore.com/ch/en/developers/api-reference/fluent-sdk--stylelabs.m.sdk.fluent.testing.extensions.fluententityextensions.html)

[FluentEntityExtensions.AssertPropertyGreaterOrEqual<T>(FluentEntity, string, T)](https://doc.sitecore.com/ch/en/developers/api-reference/fluent-sdk--stylelabs.m.sdk.fluent.testing.extensions.fluententityextensions.html)

[FluentEntityExtensions.AssertPropertyGreaterOrEqual<T>(FluentEntity, string, CultureInfo, T)](https://doc.sitecore.com/ch/en/developers/api-reference/fluent-sdk--stylelabs.m.sdk.fluent.testing.extensions.fluententityextensions.html)

[FluentEntityExtensions.AssertPropertyLess<T>(FluentEntity, string, T)](https://doc.sitecore.com/ch/en/developers/api-reference/fluent-sdk--stylelabs.m.sdk.fluent.testing.extensions.fluententityextensions.html)

[FluentEntityExtensions.AssertPropertyLess<T>(FluentEntity, string, CultureInfo, T)](https://doc.sitecore.com/ch/en/developers/api-reference/fluent-sdk--stylelabs.m.sdk.fluent.testing.extensions.fluententityextensions.html)

[FluentEntityExtensions.AssertPropertyLessOrEqual<T>(FluentEntity, string, T)](https://doc.sitecore.com/ch/en/developers/api-reference/fluent-sdk--stylelabs.m.sdk.fluent.testing.extensions.fluententityextensions.html)

[FluentEntityExtensions.AssertPropertyLessOrEqual<T>(FluentEntity, string, CultureInfo, T)](https://doc.sitecore.com/ch/en/developers/api-reference/fluent-sdk--stylelabs.m.sdk.fluent.testing.extensions.fluententityextensions.html)

[FluentEntityExtensions.AssertPropertyNotEmpty(FluentEntity, string, CultureInfo)](https://doc.sitecore.com/ch/en/developers/api-reference/fluent-sdk--stylelabs.m.sdk.fluent.testing.extensions.fluententityextensions.html)

[FluentEntityExtensions.AssertPropertyNotEmpty(FluentEntity, string)](https://doc.sitecore.com/ch/en/developers/api-reference/fluent-sdk--stylelabs.m.sdk.fluent.testing.extensions.fluententityextensions.html)

[FluentEntityExtensions.AssertPropertyNotEqual<T>(FluentEntity, string, T)](https://doc.sitecore.com/ch/en/developers/api-reference/fluent-sdk--stylelabs.m.sdk.fluent.testing.extensions.fluententityextensions.html)

[FluentEntityExtensions.AssertPropertyNotEqual<T>(FluentEntity, string, CultureInfo, T)](https://doc.sitecore.com/ch/en/developers/api-reference/fluent-sdk--stylelabs.m.sdk.fluent.testing.extensions.fluententityextensions.html)

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