---
title: "Class FluentEntities"
slug: "fluent-sdk--stylelabs.m.sdk.fluent.wrappers.fluententities"
abstract: ""
---
# Class FluentEntities

Provides access to entities in a fluent way.

## Inheritance

object

FluentEntities

## Namespace: StylelabsStylelabs.MSdkFluentWrappers

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

## Syntax

```csharp
public class FluentEntities
```

## Constructors

### FluentEntities(IEntitiesClient, ITypedEntityFactory, IEntityLoadConfiguration)

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

#### Declaration

```csharp
public FluentEntities(IEntitiesClient entitiesClient, ITypedEntityFactory typedEntityFactory, IEntityLoadConfiguration entityLoadConfiguration)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| [IEntitiesClient](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.clients.ientitiesclient.html) | entitiesClient | The [IEntitiesClient](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.clients.ientitiesclient.html) instance. |
| [ITypedEntityFactory](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.factories.itypedentityfactory.html) | typedEntityFactory | The [ITypedEntityFactory](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.factories.itypedentityfactory.html) instance. |
| [IEntityLoadConfiguration](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.framework.essentials.loadconfigurations.ientityloadconfiguration.html) | entityLoadConfiguration | The [IEntityLoadConfiguration](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.framework.essentials.loadconfigurations.ientityloadconfiguration.html). |

## Methods

### Get(long)

Gets the [FluentEntity](https://doc.sitecore.com/ch/en/developers/api-reference/fluent-sdk--stylelabs.m.sdk.fluent.models.fluententity.html) instance with the specified `id`.

#### Declaration

```csharp
public FluentEntity Get(long id)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| long | id | The id of the entity to get. |

#### Returns

| Type | Description |
| --- | --- |
| [FluentEntity](https://doc.sitecore.com/ch/en/developers/api-reference/fluent-sdk--stylelabs.m.sdk.fluent.models.fluententity.html) | The entity or null when it was not found. |

### Get(string)

Gets the [FluentEntity](https://doc.sitecore.com/ch/en/developers/api-reference/fluent-sdk--stylelabs.m.sdk.fluent.models.fluententity.html) instance with the specified `identifier`.

#### Declaration

```csharp
public FluentEntity Get(string identifier)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| string | identifier | The identifier of the entity to get. |

#### Returns

| Type | Description |
| --- | --- |
| [FluentEntity](https://doc.sitecore.com/ch/en/developers/api-reference/fluent-sdk--stylelabs.m.sdk.fluent.models.fluententity.html) | The entity or null when it was not found. |

### Get<TTypedEntity>(long)

Gets the typed entity instance with the specified `id`.

#### Declaration

```csharp
public TTypedEntity Get<TTypedEntity>(long id) where TTypedEntity : ITypedEntity
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| long | id | The id of the entity to get. |

#### Returns

| Type | Description |
| --- | --- |
| TTypedEntity | The entity or null when it was not found. |

#### Type Parameters

| Name | Description |
| --- | --- |
| TTypedEntity | The type of the typed entity. |

### Get<TTypedEntity>(string)

Gets the typed entity instance with the specified `identifier`.

#### Declaration

```csharp
public TTypedEntity Get<TTypedEntity>(string identifier) where TTypedEntity : ITypedEntity
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| string | identifier | The identifier of the entity to get. |

#### Returns

| Type | Description |
| --- | --- |
| TTypedEntity | The entity or null when it was not found. |

#### Type Parameters

| Name | Description |
| --- | --- |
| TTypedEntity | The type of the typed entity. |

### GetByDefinition(string, int, int)

Queries for entities of the specified definition.

#### Declaration

```csharp
public IEnumerable<FluentEntity> GetByDefinition(string definitionName, int skip = null, int take = null)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| string | definitionName | The name of the definition to get the entities for (case insensitive). |
| int | skip | Skip specified number of entities. If no value is specified, no items will be skipped. |
| int | take | Take only specified number of entities. If no value is specified, the default [Take](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.defaults.entities.html) will be used. |

#### Returns

| Type | Description |
| --- | --- |
| IEnumerable<>[FluentEntity](https://doc.sitecore.com/ch/en/developers/api-reference/fluent-sdk--stylelabs.m.sdk.fluent.models.fluententity.html) | A (non-null) list of [FluentEntity](https://doc.sitecore.com/ch/en/developers/api-reference/fluent-sdk--stylelabs.m.sdk.fluent.models.fluententity.html). |

### GetMany(long\[\])

Gets multiple [FluentEntity](https://doc.sitecore.com/ch/en/developers/api-reference/fluent-sdk--stylelabs.m.sdk.fluent.models.fluententity.html) instances with the specified `ids`. The result can have a different ordering and size (when entities don't exist) than the input.

#### Declaration

```csharp
public IEnumerable<FluentEntity> GetMany(long[] ids)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| long | ids | The ids of the entities to get. |

#### Returns

| Type | Description |
| --- | --- |
| IEnumerable<>[FluentEntity](https://doc.sitecore.com/ch/en/developers/api-reference/fluent-sdk--stylelabs.m.sdk.fluent.models.fluententity.html) | A (non-null) list of [FluentEntity](https://doc.sitecore.com/ch/en/developers/api-reference/fluent-sdk--stylelabs.m.sdk.fluent.models.fluententity.html). |

### GetMany(string\[\])

Gets multiple [FluentEntity](https://doc.sitecore.com/ch/en/developers/api-reference/fluent-sdk--stylelabs.m.sdk.fluent.models.fluententity.html) instances with the specified `identifiers`. The result can have a different ordering and size (when entities don't exist) than the input.

#### Declaration

```csharp
public IEnumerable<FluentEntity> GetMany(string[] identifiers)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| string | identifiers | The identifiers of the entities to get. |

#### Returns

| Type | Description |
| --- | --- |
| IEnumerable<>[FluentEntity](https://doc.sitecore.com/ch/en/developers/api-reference/fluent-sdk--stylelabs.m.sdk.fluent.models.fluententity.html) | A (non-null) list of [FluentEntity](https://doc.sitecore.com/ch/en/developers/api-reference/fluent-sdk--stylelabs.m.sdk.fluent.models.fluententity.html). |
