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
entityType
IEntityTypeoptions
KafkaOptionsExtension
Returns
ConsumerInstances(IEntityType, KafkaOptionsExtension)
Gets consumer instances
public static int? ConsumerInstances(this IEntityType entityType, KafkaOptionsExtension options)
Parameters
entityType
IEntityTypeoptions
KafkaOptionsExtension
Returns
- int?
GetDefiningQueryConfigurationSource(IConventionEntityType)
Returns the configuration source for GetKafkaQuery(IReadOnlyEntityType).
public static ConfigurationSource? GetDefiningQueryConfigurationSource(this IConventionEntityType entityType)
Parameters
entityType
IConventionEntityTypeThe 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
IReadOnlyEntityTypeThe 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
IEntityTypeoptions
KafkaOptionsExtension
Returns
ReplicationFactor(IEntityType, KafkaOptionsExtension)
Gets replication factor
public static short ReplicationFactor(this IEntityType entityType, KafkaOptionsExtension options)
Parameters
entityType
IEntityTypeoptions
KafkaOptionsExtension
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
entityType
IConventionEntityTypeThe entity type.
kafkaQuery
LambdaExpressionThe LINQ query used as the default source.
fromDataAnnotation
boolIndicates 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
IMutableEntityTypeThe entity type.
kafkaQuery
LambdaExpressionThe 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
IEntityTypeoptions
KafkaOptionsExtension
Returns
TopicName(IEntityType, KafkaOptionsExtension)
Creates the topic name
public static string TopicName(this IEntityType entityType, KafkaOptionsExtension options)
Parameters
entityType
IEntityTypeoptions
KafkaOptionsExtension