Share via


ComplexTypePrimitiveCollectionBuilder.IsConcurrencyToken(Boolean) Method

Definition

Configures whether this property should be used as a concurrency token. When a property is configured as a concurrency token the value in the database will be checked when an instance of this complex type is updated or deleted during SaveChanges() to ensure it has not changed since the instance was retrieved from the database. If it has changed, an exception will be thrown and the changes will not be applied to the database.

public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexTypePrimitiveCollectionBuilder IsConcurrencyToken (bool concurrencyToken = true);
abstract member IsConcurrencyToken : bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexTypePrimitiveCollectionBuilder
override this.IsConcurrencyToken : bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexTypePrimitiveCollectionBuilder
Public Overridable Function IsConcurrencyToken (Optional concurrencyToken As Boolean = true) As ComplexTypePrimitiveCollectionBuilder

Parameters

concurrencyToken
Boolean

A value indicating whether this property is a concurrency token.

Returns

The same builder instance so that multiple configuration calls can be chained.

Applies to