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
See Modeling entity types and relationships, and The EF Core Kafka database provider for more information and examples.
Methods
ApplicationIdForTable(IEntityType, KafkaOptionsExtension)
Creates the application id
public static string ApplicationIdForTable(this IEntityType entityType, KafkaOptionsExtension options)
Parameters
entityTypeIEntityTypeoptionsKafkaOptionsExtension
Returns
ConsumerInstances(IEntityType, KafkaOptionsExtension)
Gets consumer instances
public static int? ConsumerInstances(this IEntityType entityType, KafkaOptionsExtension options)
Parameters
entityTypeIEntityTypeoptionsKafkaOptionsExtension
Returns
- int?
GetDefiningQueryConfigurationSource(IConventionEntityType)
Returns the configuration source for GetKafkaQuery(IReadOnlyEntityType).
public static ConfigurationSource? GetDefiningQueryConfigurationSource(this IConventionEntityType entityType)
Parameters
entityTypeIConventionEntityTypeThe 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
entityTypeIReadOnlyEntityTypeThe 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
entityTypeIEntityTypeoptionsKafkaOptionsExtension
Returns
ReplicationFactor(IEntityType, KafkaOptionsExtension)
Gets replication factor
public static short ReplicationFactor(this IEntityType entityType, KafkaOptionsExtension options)
Parameters
entityTypeIEntityTypeoptionsKafkaOptionsExtension
Returns
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
entityTypeIConventionEntityTypeThe entity type.
kafkaQueryLambdaExpressionThe LINQ query used as the default source.
fromDataAnnotationboolIndicates 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
entityTypeIMutableEntityTypeThe entity type.
kafkaQueryLambdaExpressionThe LINQ query used as the default source.
StorageIdForTable(IEntityType, KafkaOptionsExtension)
Creates the storage id
public static string StorageIdForTable(this IEntityType entityType, KafkaOptionsExtension options)
Parameters
entityTypeIEntityTypeoptionsKafkaOptionsExtension
Returns
TopicName(IEntityType, KafkaOptionsExtension)
Creates the topic name
public static string TopicName(this IEntityType entityType, KafkaOptionsExtension options)
Parameters
entityTypeIEntityTypeoptionsKafkaOptionsExtension