---
title: "Interface IEntityCopyOptionsBuilder"
slug: "sdk--stylelabs.m.sdk.models.content.ientitycopyoptionsbuilder"
abstract: ""
---
# Interface IEntityCopyOptionsBuilder

A builder for instances of [IEntityCopyOptions](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.models.content.ientitycopyoptions.html).

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

## Assembly: Stylelabs.M.Sdk.dll

## Syntax

```csharp
public interface IEntityCopyOptionsBuilder
```

## Methods

### Build()

Gets the resulting instance of [IEntityCopyOptions](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.models.content.ientitycopyoptions.html).

#### Declaration

```csharp
IEntityCopyOptions Build()
```

#### Returns

| Type | Description |
| --- | --- |
| [IEntityCopyOptions](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.models.content.ientitycopyoptions.html) | The builder. |

### WithCopyProfile(long)

Indicates that the entity should be copied using the copy profile with the specified `id`.

#### Declaration

```csharp
IEntityCopyOptionsBuilder WithCopyProfile(long id)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| long | id | The id of the copy profile. |

#### Returns

| Type | Description |
| --- | --- |
| [IEntityCopyOptionsBuilder](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.models.content.ientitycopyoptionsbuilder.html) | The builder. |

### WithCopyProfile(string)

Indicates that the entity should be copied using the copy profile with the specified `identifier`.

#### Declaration

```csharp
IEntityCopyOptionsBuilder WithCopyProfile(string identifier)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| string | identifier | The identifier of the copy profile. |

#### Returns

| Type | Description |
| --- | --- |
| [IEntityCopyOptionsBuilder](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.models.content.ientitycopyoptionsbuilder.html) | The builder. |

### WithDestinationEntityId(long)

Indicates that the entity should be copied to the entity with the specified `id`.

#### Declaration

```csharp
IEntityCopyOptionsBuilder WithDestinationEntityId(long id)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| long | id | The destination entity id. |

#### Returns

| Type | Description |
| --- | --- |
| [IEntityCopyOptionsBuilder](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.models.content.ientitycopyoptionsbuilder.html) | The builder. |

### WithProperties(IEnumerable<IPropertyCopyOption>)

Indicates that the entity should be copied with the specified `properties`.

#### Declaration

```csharp
IEntityCopyOptionsBuilder WithProperties(IEnumerable<IPropertyCopyOption> properties)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| IEnumerable<>[IPropertyCopyOption](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.models.content.ipropertycopyoption.html) | properties | The properties collection. |

#### Returns

| Type | Description |
| --- | --- |
| [IEntityCopyOptionsBuilder](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.models.content.ientitycopyoptionsbuilder.html) | The builder. |

### WithProperty(string, PropertyCopyMethod, string)

Indicates that the entity should be copied with the specified `property`.

#### Declaration

```csharp
IEntityCopyOptionsBuilder WithProperty(string property, PropertyCopyMethod method, string newValue = null)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| string | property | The name of the property. |
| [PropertyCopyMethod](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.models.content.propertycopymethod.html) | method | The copy method. |
| string | newValue | The property new value. |

#### Returns

| Type | Description |
| --- | --- |
| [IEntityCopyOptionsBuilder](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.models.content.ientitycopyoptionsbuilder.html) | The builder. |

### WithRelation(string, RelationCopyMethod, IEntityCopyOptions)

Indicates that the entity should be copied with the specified `relation`.

#### Declaration

```csharp
IEntityCopyOptionsBuilder WithRelation(string relation, RelationCopyMethod method, IEntityCopyOptions relatedOptions = null)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| string | relation | The name of the relation. |
| [RelationCopyMethod](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.models.content.relationcopymethod.html) | method | The copy method. |
| [IEntityCopyOptions](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.models.content.ientitycopyoptions.html) | relatedOptions | The related options. |

#### Returns

| Type | Description |
| --- | --- |
| [IEntityCopyOptionsBuilder](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.models.content.ientitycopyoptionsbuilder.html) | The builder. |

### WithRelations(IEnumerable<IRelationCopyOption>)

Indicates that the entity should be copied with the specified `relations`.

#### Declaration

```csharp
IEntityCopyOptionsBuilder WithRelations(IEnumerable<IRelationCopyOption> relations)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| IEnumerable<>[IRelationCopyOption](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.models.content.irelationcopyoption.html) | relations | The relations collection. |

#### Returns

| Type | Description |
| --- | --- |
| [IEntityCopyOptionsBuilder](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.models.content.ientitycopyoptionsbuilder.html) | The builder. |
