Class KafkaEntityTypeBuilderExtensions
- Namespace
- MASES.EntityFrameworkCore.KNet
- Assembly
- MASES.EntityFrameworkCore.KNet.dll
Extension methods for EntityTypeBuilder for the Kafka provider.
public static class KafkaEntityTypeBuilderExtensions
- Inheritance
-
KafkaEntityTypeBuilderExtensions
- Inherited Members
Remarks
See Modeling entity types and relationships, and The EF Core Kafka database provider for more information and examples.
Methods
CanSetKafkaQuery(IConventionEntityTypeBuilder, LambdaExpression?, bool)
Returns a value indicating whether the given Kafka query can be set from the current configuration source.
public static bool CanSetKafkaQuery(this IConventionEntityTypeBuilder entityTypeBuilder, LambdaExpression? query, bool fromDataAnnotation = false)
Parameters
entityTypeBuilder
IConventionEntityTypeBuilderThe builder for the entity type being configured.
query
LambdaExpressionThe query that will provide the underlying data for the keyless entity type.
fromDataAnnotation
boolIndicates whether the configuration was specified using a data annotation.
Returns
Remarks
See Modeling entity types and relationships, and The EF Core Kafka database provider for more information and examples.
ToKafkaQuery(EntityTypeBuilder, LambdaExpression?)
Configures a query used to provide data for an entity type.
public static EntityTypeBuilder ToKafkaQuery(this EntityTypeBuilder entityTypeBuilder, LambdaExpression? query)
Parameters
entityTypeBuilder
EntityTypeBuilderThe builder for the entity type being configured.
query
LambdaExpressionThe query that will provide the underlying data for the entity type.
Returns
- EntityTypeBuilder
The same builder instance so that multiple calls can be chained.
Remarks
See Modeling entity types and relationships, and The EF Core Kafka database provider for more information and examples.
ToKafkaQuery(IConventionEntityTypeBuilder, LambdaExpression?, bool)
Configures a query used to provide data for an entity type.
public static IConventionEntityTypeBuilder? ToKafkaQuery(this IConventionEntityTypeBuilder entityTypeBuilder, LambdaExpression? query, bool fromDataAnnotation = false)
Parameters
entityTypeBuilder
IConventionEntityTypeBuilderThe builder for the entity type being configured.
query
LambdaExpressionThe query that will provide the underlying data for the entity type.
fromDataAnnotation
boolIndicates whether the configuration was specified using a data annotation.
Returns
- IConventionEntityTypeBuilder
The same builder instance if the query was set, null otherwise.
Remarks
See Modeling entity types and relationships, and The EF Core Kafka database provider for more information and examples.
ToKafkaQuery<TEntity>(EntityTypeBuilder<TEntity>, Expression<Func<IQueryable<TEntity>>>)
Configures a query used to provide data for an entity type.
public static EntityTypeBuilder<TEntity> ToKafkaQuery<TEntity>(this EntityTypeBuilder<TEntity> entityTypeBuilder, Expression<Func<IQueryable<TEntity>>> query) where TEntity : class
Parameters
entityTypeBuilder
EntityTypeBuilder<TEntity>The builder for the entity type being configured.
query
Expression<Func<IQueryable<TEntity>>>The query that will provide the underlying data for the entity type.
Returns
- EntityTypeBuilder<TEntity>
The same builder instance so that multiple calls can be chained.
Type Parameters
TEntity
Remarks
See Modeling entity types and relationships, and The EF Core Kafka database provider for more information and examples.