Table of Contents

Class KafkaIntegerValueGenerator<TValue>

Namespace
MASES.EntityFrameworkCore.KNet.ValueGeneration.Internal
Assembly
MASES.EntityFrameworkCore.KNet.dll

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public class KafkaIntegerValueGenerator<TValue> : ValueGenerator<TValue>, IKafkaIntegerValueGenerator

Type Parameters

TValue
Inheritance
KafkaIntegerValueGenerator<TValue>
Implements
Inherited Members

Constructors

KafkaIntegerValueGenerator(int)

Default initializer

public KafkaIntegerValueGenerator(int propertyIndex)

Parameters

propertyIndex int

Properties

GeneratesTemporaryValues

Gets a value indicating whether the values generated are temporary (i.e they should be replaced by database generated values when the entity is saved) or are permanent (i.e. the generated values should be saved to the database).

public override bool GeneratesTemporaryValues { get; }

Property Value

bool

Remarks

An example of temporary value generation is generating negative numbers for an integer primary key that are then replaced by positive numbers generated by the database when the entity is saved. An example of permanent value generation are client-generated values for a Guid primary key which are saved to the database.

See EF Core value generation for more information and examples.

Methods

Bump(object?[])

Execute a bump on data

public virtual void Bump(object?[] row)

Parameters

row object[]

Next(EntityEntry)

Template method to be overridden by implementations to perform value generation.

public override TValue Next(EntityEntry entry)

Parameters

entry EntityEntry

The change tracking entry of the entity for which the value is being generated.

Returns

TValue

The generated value.

Remarks

See EF Core value generation for more information and examples.