---
title: "Interface ITypedEntityFactory"
slug: "sdk--stylelabs.m.sdk.factories.itypedentityfactory"
abstract: ""
---
# Interface ITypedEntityFactory

Defines the typed entity factory.

## Namespace: StylelabsStylelabs.MSdkFactories

## Assembly: Stylelabs.M.Sdk.dll

## Syntax

```csharp
public interface ITypedEntityFactory
```

## Methods

### CreateEntity(EntityConstructionArgs)

Creates a typed entity.

#### Declaration

```csharp
IEntity CreateEntity(EntityConstructionArgs args)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| [EntityConstructionArgs](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.models.base.entityconstructionargs.html) | args | The entity construction arguments. |

#### Returns

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

### FromEntity<T>(IEntity)

Maps an [IEntity](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.contracts.base.ientity.html) to a typed entity.

#### Declaration

```csharp
T FromEntity<T>(IEntity entity) where T : ITypedEntity
```

#### 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 to map. |

#### Returns

| Type | Description |
| --- | --- |
| T | The typed entity. |

#### Type Parameters

| Name | Description |
| --- | --- |
| T | The typed entity type. |
