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

# DataModificationItem

> Represents a data modification item in a change set.

## Definition

**Assembly:** Microsoft.Restier.Core.dll

**Namespace:** Microsoft.Restier.Core.Submit

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

## Syntax

```csharp theme={"dark"}
Microsoft.Restier.Core.Submit.DataModificationItem<T>
```

## Summary

Represents a data modification item in a change set.

## Type Parameters

* `T` - The resource type.

## Constructors

### &#x20;.ctor

Initializes a new instance of the [DataModificationItem\`1](https://learn.microsoft.com/dotnet/api/microsoft.restier.core.submit.datamodificationitem-1) class.

#### Syntax

```csharp theme={"dark"}
public DataModificationItem(string resourceSetName, System.Type expectedResourceType, System.Type actualResourceType, Microsoft.Restier.Core.RestierEntitySetOperation action, System.Collections.Generic.IReadOnlyDictionary<string, object> resourceKey, System.Collections.Generic.IReadOnlyDictionary<string, object> originalValues, System.Collections.Generic.IReadOnlyDictionary<string, object> localValues)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `resourceSetName` | `string` | The name of the resource set in question. |
| `expectedResourceType` | `System.Type` | The type of the expected resource type in question. |
| `actualResourceType` | `System.Type` | The type of the actual resource type in question. |
| `action` | `Microsoft.Restier.Core.RestierEntitySetOperation` | The RestierEntitySetOperations for the request. |
| `resourceKey` | `System.Collections.Generic.IReadOnlyDictionary<string, object>` | The key of the resource being modified. |
| `originalValues` | `System.Collections.Generic.IReadOnlyDictionary<string, object>` | Any original values of the resource that are known. |
| `localValues` | `System.Collections.Generic.IReadOnlyDictionary<string, object>` | The local values of the entity. |

### &#x20;.ctor Inherited

> [!NOTE]
>
> Inherited from `Microsoft.Restier.Core.Submit.DataModificationItem`

Initializes a new instance of the [DataModificationItem](https://easyaf.nimbleapps.cloud/restier/api-reference/Microsoft/Restier/Core/Submit/DataModificationItem.md) class.

#### Syntax

```csharp theme={"dark"}
public DataModificationItem(string resourceSetName, System.Type expectedResourceType, System.Type actualResourceType, Microsoft.Restier.Core.RestierEntitySetOperation action, System.Collections.Generic.IReadOnlyDictionary<string, object> resourceKey, System.Collections.Generic.IReadOnlyDictionary<string, object> originalValues, System.Collections.Generic.IReadOnlyDictionary<string, object> localValues)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `resourceSetName` | `string` | The name of the resource set in question. |
| `expectedResourceType` | `System.Type` | The type of the expected resource type in question. |
| `actualResourceType` | `System.Type` | The type of the actual resource type in question. |
| `action` | `Microsoft.Restier.Core.RestierEntitySetOperation` | The RestierEntitySetOperations for the request. |
| `resourceKey` | `System.Collections.Generic.IReadOnlyDictionary<string, object>` | The key of the resource being modified. |
| `originalValues` | `System.Collections.Generic.IReadOnlyDictionary<string, object>` | Any original values of the resource that are known. |
| `localValues` | `System.Collections.Generic.IReadOnlyDictionary<string, object>` | The local values of the resource. |

### &#x20;.ctor Inherited

> [!NOTE]
>
> Inherited from `Microsoft.Restier.Core.Submit.ChangeSetItem`

#### Syntax

```csharp theme={"dark"}
internal ChangeSetItem(Microsoft.Restier.Core.Submit.ChangeSetItemType type)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `type` | `Microsoft.Restier.Core.Submit.ChangeSetItemType` | - |

### &#x20;.ctor Inherited

> [!NOTE]
>
> Inherited from `object`

#### Syntax

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

## Properties

### &#x20;ActualResourceType Inherited

> [!NOTE]
>
> Inherited from `Microsoft.Restier.Core.Submit.DataModificationItem`

Gets the name of the actual resource type in question.
In type inheritance case, this is different from expectedResourceType

#### Syntax

```csharp theme={"dark"}
public System.Type ActualResourceType { get; private set; }
```

#### Property Value

Type: `System.Type`

### &#x20;ChangeSetItemProcessingStage Inherited

> [!NOTE]
>
> Inherited from `Microsoft.Restier.Core.Submit.ChangeSetItem`

Gets or sets the dynamic state of this change set item.

#### Syntax

```csharp theme={"dark"}
internal Microsoft.Restier.Core.Submit.ChangeSetItemProcessingStage ChangeSetItemProcessingStage { get; set; }
```

#### Property Value

Type: `Microsoft.Restier.Core.Submit.ChangeSetItemProcessingStage`

### &#x20;EntitySetOperation Inherited

> [!NOTE]
>
> Inherited from `Microsoft.Restier.Core.Submit.DataModificationItem`

Gets or sets the action to be taken.

#### Syntax

```csharp theme={"dark"}
public Microsoft.Restier.Core.RestierEntitySetOperation EntitySetOperation { get; set; }
```

#### Property Value

Type: `Microsoft.Restier.Core.RestierEntitySetOperation`

### &#x20;ExpectedResourceType Inherited

> [!NOTE]
>
> Inherited from `Microsoft.Restier.Core.Submit.DataModificationItem`

Gets the name of the expected resource type in question.

#### Syntax

```csharp theme={"dark"}
public System.Type ExpectedResourceType { get; private set; }
```

#### Property Value

Type: `System.Type`

### &#x20;IsFullReplaceUpdateRequest Inherited

> [!NOTE]
>
> Inherited from `Microsoft.Restier.Core.Submit.DataModificationItem`

Gets or sets a value indicating whether the resource should be fully replaced by the modification.

#### Syntax

```csharp theme={"dark"}
public bool IsFullReplaceUpdateRequest { get; set; }
```

#### Property Value

Type: `bool`

#### Remarks

If true, all properties will be updated, even if the property isn't in LocalValues.
If false, only properties identified in LocalValues will be updated on the resource.

### &#x20;LocalValues Inherited

> [!NOTE]
>
> Inherited from `Microsoft.Restier.Core.Submit.DataModificationItem`

Gets the local values for properties that have changed.

#### Syntax

```csharp theme={"dark"}
public System.Collections.Generic.IReadOnlyDictionary<string, object> LocalValues { get; private set; }
```

#### Property Value

Type: `System.Collections.Generic.IReadOnlyDictionary<string, object>`

#### Remarks

For entities pending deletion, this property is `null`.

### &#x20;OriginalValues Inherited

> [!NOTE]
>
> Inherited from `Microsoft.Restier.Core.Submit.DataModificationItem`

Gets the original values for properties that have changed.

#### Syntax

```csharp theme={"dark"}
public System.Collections.Generic.IReadOnlyDictionary<string, object> OriginalValues { get; private set; }
```

#### Property Value

Type: `System.Collections.Generic.IReadOnlyDictionary<string, object>`

#### Remarks

For new entities, this property is `null`.

### &#x20;Resource

Gets or sets the resource object in question.

#### Syntax

```csharp theme={"dark"}
public T Resource { get; set; }
```

#### Property Value

Type: `T`

#### Remarks

Initially this will be `null`, however after the change
set has been prepared it will represent the pending resource.

### &#x20;Resource Inherited

> [!NOTE]
>
> Inherited from `Microsoft.Restier.Core.Submit.DataModificationItem`

Gets or sets the resource object in question.

#### Syntax

```csharp theme={"dark"}
public object Resource { get; set; }
```

#### Property Value

Type: `object`

#### Remarks

Initially this will be `null`, however after the change
set has been prepared it will represent the pending resource.

### &#x20;ResourceKey Inherited

> [!NOTE]
>
> Inherited from `Microsoft.Restier.Core.Submit.DataModificationItem`

Gets the key of the resource being modified.

#### Syntax

```csharp theme={"dark"}
public System.Collections.Generic.IReadOnlyDictionary<string, object> ResourceKey { get; private set; }
```

#### Property Value

Type: `System.Collections.Generic.IReadOnlyDictionary<string, object>`

### &#x20;ResourceSetName Inherited

> [!NOTE]
>
> Inherited from `Microsoft.Restier.Core.Submit.DataModificationItem`

Gets the name of the resource set in question.

#### Syntax

```csharp theme={"dark"}
public string ResourceSetName { get; private set; }
```

#### Property Value

Type: `string`

### &#x20;ServerValues Inherited

> [!NOTE]
>
> Inherited from `Microsoft.Restier.Core.Submit.DataModificationItem`

Gets the current server values for properties that have changed.

#### Syntax

```csharp theme={"dark"}
public System.Collections.Generic.IReadOnlyDictionary<string, object> ServerValues { get; private set; }
```

#### Property Value

Type: `System.Collections.Generic.IReadOnlyDictionary<string, object>`

#### Remarks

For new entities, this property is `null`. For updated
entities, it is `null` until the change set is prepared.

### &#x20;Type Inherited

> [!NOTE]
>
> Inherited from `Microsoft.Restier.Core.Submit.ChangeSetItem`

Gets the type of this change set item.

#### Syntax

```csharp theme={"dark"}
internal Microsoft.Restier.Core.Submit.ChangeSetItemType Type { get; private set; }
```

#### Property Value

Type: `Microsoft.Restier.Core.Submit.ChangeSetItemType`

## Methods

### &#x20;ApplyTo Inherited

> [!NOTE]
>
> Inherited from `Microsoft.Restier.Core.Submit.DataModificationItem`

Applies the current DataModificationItem's KeyValues and OriginalValues to the
specified query and returns the new query.

#### Syntax

```csharp theme={"dark"}
public System.Linq.IQueryable ApplyTo(System.Linq.IQueryable query)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `query` | `System.Linq.IQueryable` | The IQueryable to apply the property values to. |

#### Returns

Type: `System.Linq.IQueryable`
The new IQueryable with the property values applied to it in a Where condition.

### &#x20;Equals Inherited Virtual

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={"dark"}
public virtual bool Equals(object obj)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `obj` | `object?` | - |

#### Returns

Type: `bool`

### &#x20;Equals Inherited

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={"dark"}
public static bool Equals(object objA, object objB)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `objA` | `object?` | - |
| `objB` | `object?` | - |

#### Returns

Type: `bool`

### &#x20;GetHashCode Inherited Virtual

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={"dark"}
public virtual int GetHashCode()
```

#### Returns

Type: `int`

### &#x20;GetType Inherited

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={"dark"}
public System.Type GetType()
```

#### Returns

Type: `System.Type`

### &#x20;HasChanged Inherited

> [!NOTE]
>
> Inherited from `Microsoft.Restier.Core.Submit.ChangeSetItem`

Indicates whether this change set item is in a changed state.

#### Syntax

```csharp theme={"dark"}
public bool HasChanged()
```

#### Returns

Type: `bool`
Whether this change set item is in a changed state.

### &#x20;MemberwiseClone Inherited

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={"dark"}
protected internal object MemberwiseClone()
```

#### Returns

Type: `object`

### &#x20;ReferenceEquals Inherited

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={"dark"}
public static bool ReferenceEquals(object objA, object objB)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `objA` | `object?` | - |
| `objB` | `object?` | - |

#### Returns

Type: `bool`

### &#x20;ToString Inherited Virtual

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={"dark"}
public virtual string ToString()
```

#### Returns

Type: `string?`

### &#x20;ValidateEtag Inherited

> [!NOTE]
>
> Inherited from `Microsoft.Restier.Core.Submit.DataModificationItem`

Validate the e-tag via applies the current DataModificationItem's OriginalValues to the
specified query and returns result.

#### Syntax

```csharp theme={"dark"}
public object ValidateEtag(System.Linq.IQueryable query)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `query` | `System.Linq.IQueryable` | The IQueryable to apply the property values to. |

#### Returns

Type: `object`
The object is e-tag checked passed.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.