Table of Contents

Class KafkaEntityTypeExtensions

Namespace
MASES.EntityFrameworkCore.KNet
Assembly
MASES.EntityFrameworkCore.KNet.dll

Extension methods for IReadOnlyEntityType for the Kafka provider.

public static class KafkaEntityTypeExtensions
Inheritance
KafkaEntityTypeExtensions
Inherited Members

Remarks

Methods

ApplicationIdForTable(IEntityType, KafkaOptionsExtension)

Creates the application id

public static string ApplicationIdForTable(this IEntityType entityType, KafkaOptionsExtension options)

Parameters

entityType IEntityType
options KafkaOptionsExtension

Returns

string

ConsumerInstances(IEntityType, KafkaOptionsExtension)

Gets consumer instances

public static int? ConsumerInstances(this IEntityType entityType, KafkaOptionsExtension options)

Parameters

entityType IEntityType
options KafkaOptionsExtension

Returns

int?

GetDefiningQueryConfigurationSource(IConventionEntityType)

Returns the configuration source for GetKafkaQuery(IReadOnlyEntityType).

public static ConfigurationSource? GetDefiningQueryConfigurationSource(this IConventionEntityType entityType)

Parameters

entityType IConventionEntityType

The entity type.

Returns

ConfigurationSource?

The configuration source for GetKafkaQuery(IReadOnlyEntityType).

GetKafkaQuery(IReadOnlyEntityType)

Gets the LINQ query used as the default source for queries of this type.

public static LambdaExpression? GetKafkaQuery(this IReadOnlyEntityType entityType)

Parameters

entityType IReadOnlyEntityType

The entity type to get the Kafka query for.

Returns

LambdaExpression

The LINQ query used as the default source.

NumPartitions(IEntityType, KafkaOptionsExtension)

Gets number of partitions

public static int NumPartitions(this IEntityType entityType, KafkaOptionsExtension options)

Parameters

entityType IEntityType
options KafkaOptionsExtension

Returns

int

ReplicationFactor(IEntityType, KafkaOptionsExtension)

Gets replication factor

public static short ReplicationFactor(this IEntityType entityType, KafkaOptionsExtension options)

Parameters

entityType IEntityType
options KafkaOptionsExtension

Returns

short

SetKafkaQuery(IConventionEntityType, LambdaExpression?, bool)

Sets the LINQ query used as the default source for queries of this type.

public static LambdaExpression? SetKafkaQuery(this IConventionEntityType entityType, LambdaExpression? kafkaQuery, bool fromDataAnnotation = false)

Parameters

entityType IConventionEntityType

The entity type.

kafkaQuery LambdaExpression

The LINQ query used as the default source.

fromDataAnnotation bool

Indicates whether the configuration was specified using a data annotation.

Returns

LambdaExpression

The configured entity type.

SetKafkaQuery(IMutableEntityType, LambdaExpression?)

Sets the LINQ query used as the default source for queries of this type.

public static void SetKafkaQuery(this IMutableEntityType entityType, LambdaExpression? kafkaQuery)

Parameters

entityType IMutableEntityType

The entity type.

kafkaQuery LambdaExpression

The LINQ query used as the default source.

StorageIdForTable(IEntityType, KafkaOptionsExtension)

Creates the storage id

public static string StorageIdForTable(this IEntityType entityType, KafkaOptionsExtension options)

Parameters

entityType IEntityType
options KafkaOptionsExtension

Returns

string

TopicName(IEntityType, KafkaOptionsExtension)

Creates the topic name

public static string TopicName(this IEntityType entityType, KafkaOptionsExtension options)

Parameters

entityType IEntityType
options KafkaOptionsExtension

Returns

string