Search documentationEsc

IPatchOperationBuilder<TItem>

Allows a collection of `PatchOperation`'s to built./&gt;

Namespace: Microsoft.Azure.CosmosRepository.Builders
Kind: interface

Allows a collection of PatchOperation’s to built./>

public interface IPatchOperationBuilder<TItem> where TItem : IItem

Type parameters

NameDescription
TItem

Example

Members

Property

IPatchOperationBuilder<TItem>.PatchOperations

The currently built PatchOperation’s

IReadOnlyList<PatchOperation> PatchOperations { get; }

ReturnsPatchOperation}

Method

IPatchOperationBuilder<TItem>.Replace<TValue>(Expression<Func<TItem, TValue>>, TValue?)

Allows a property of an IItem to be replaced with the value provided

IPatchOperationBuilder<TItem> Replace<TValue>(Expression<Func<TItem, TValue>> expression, TValue? value)

Parameters

NameTypeDescription
expressionFunc{{TItem},{TValue}}}The expression to define which property to operate on.
value{TValue}The value to replace the property defined with.

ReturnsIPatchOperationBuilder: The same instance of IPatchOperationBuilder

This currently only supports operations on properties on the root level of a JSON document, replacing properties on a nested object for example are currently not supported.