> ## Documentation Index
> Fetch the complete documentation index at: https://easyaf.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# EFChangeSetInitializer

> To prepare changed entries for the given [ChangeSet](/restier/api-reference/Microsoft/Restier/Core/Submit/ChangeSet).

## Definition

**Assembly:** Microsoft.Restier.EntityFrameworkCore.dll

**Namespace:** Microsoft.Restier.EntityFrameworkCore

**Inheritance:** Microsoft.Restier.Core.Submit.DefaultChangeSetInitializer

## Syntax

```csharp theme={"dark"}
Microsoft.Restier.EntityFrameworkCore.EFChangeSetInitializer
```

## Summary

To prepare changed entries for the given [ChangeSet](/restier/api-reference/Microsoft/Restier/Core/Submit/ChangeSet).

## Constructors

### <Icon icon="hammer" iconType="duotone" color="#419AC5" size={24} className="mr-2" /> .ctor

#### Syntax

```csharp theme={"dark"}
public EFChangeSetInitializer()
```

## Methods

### <Icon icon="code-fork" iconType="duotone" color="#419AC5" size={24} className="mr-2" /> ConvertToEfValue <Badge color="orange">Virtual</Badge>

Convert a Edm type value to Resource Framework supported value type.

#### Syntax

```csharp theme={"dark"}
public virtual object ConvertToEfValue(System.Type type, object value)
```

#### Parameters

| Name    | Type          | Description                                           |
| ------- | ------------- | ----------------------------------------------------- |
| `type`  | `System.Type` | The type of the property defined in CLR class.        |
| `value` | `object`      | The value from OData deserializer and in type of Edm. |

#### Returns

Type: `object`
The converted value object.

### <Icon icon="code-merge" iconType="duotone" color="#419AC5" size={24} className="mr-2" /> InitializeAsync <Badge color="blue">Override</Badge>

Asynchronously prepare the [ChangeSet](/restier/api-reference/Microsoft/Restier/Core/Submit/ChangeSet).

#### Syntax

```csharp theme={"dark"}
public override System.Threading.Tasks.Task InitializeAsync(Microsoft.Restier.Core.Submit.SubmitContext context, System.Threading.CancellationToken cancellationToken)
```

#### Parameters

| Name                | Type                                          | Description                                    |
| ------------------- | --------------------------------------------- | ---------------------------------------------- |
| `context`           | `Microsoft.Restier.Core.Submit.SubmitContext` | The submit context class used for preparation. |
| `cancellationToken` | `System.Threading.CancellationToken`          | The cancellation token.                        |

#### Returns

Type: `System.Threading.Tasks.Task`
The task object that represents this asynchronous operation.
