Table of Contents

Class KEFCoreEntityTypeExtensions

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

Extension methods for IReadOnlyEntityType for the Kafka provider.

public static class KEFCoreEntityTypeExtensions
Inheritance
KEFCoreEntityTypeExtensions
Inherited Members

Remarks

Methods

ApplicationIdForTable(IEntityType, KEFCoreOptionsExtension)

Creates the application id

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

Parameters

entityType IEntityType
options KEFCoreOptionsExtension

Returns

string

ConsumerInstances(IEntityType, KEFCoreOptionsExtension)

Gets consumer instances

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

Parameters

entityType IEntityType
options KEFCoreOptionsExtension

Returns

int?

GetDefiningQueryConfigurationSource(IConventionEntityType)

Returns the configuration source for GetKEFCoreQuery(IReadOnlyEntityType).

public static ConfigurationSource? GetDefiningQueryConfigurationSource(this IConventionEntityType entityType)

Parameters

entityType IConventionEntityType

The entity type.

Returns

ConfigurationSource?

The configuration source for GetKEFCoreQuery(IReadOnlyEntityType).

GetKEFCoreQuery(IReadOnlyEntityType)

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

public static LambdaExpression? GetKEFCoreQuery(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, KEFCoreOptionsExtension)

Gets number of partitions

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

Parameters

entityType IEntityType
options KEFCoreOptionsExtension

Returns

int

ReplicationFactor(IEntityType, KEFCoreOptionsExtension)

Gets replication factor

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

Parameters

entityType IEntityType
options KEFCoreOptionsExtension

Returns

short

SetKEFCoreQuery(IConventionEntityType, LambdaExpression?, bool)

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

public static LambdaExpression? SetKEFCoreQuery(this IConventionEntityType entityType, LambdaExpression? kefcoreQuery, bool fromDataAnnotation = false)

Parameters

entityType IConventionEntityType

The entity type.

kefcoreQuery 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.

SetKEFCoreQuery(IMutableEntityType, LambdaExpression?)

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

public static void SetKEFCoreQuery(this IMutableEntityType entityType, LambdaExpression? kefcoreQuery)

Parameters

entityType IMutableEntityType

The entity type.

kefcoreQuery LambdaExpression

The LINQ query used as the default source.

StorageIdForTable(IEntityType, KEFCoreOptionsExtension)

Creates the storage id

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

Parameters

entityType IEntityType
options KEFCoreOptionsExtension

Returns

string

TopicName(IEntityType, KEFCoreOptionsExtension)

Creates the topic name

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

Parameters

entityType IEntityType
options KEFCoreOptionsExtension

Returns

string

TopicName(IEntityType, string?)

Creates the topic name

public static string TopicName(this IEntityType entityType, string? topicPrefix = null)

Parameters

entityType IEntityType
topicPrefix string

Returns

string