In this article I don’t speak about usage of Entity Framework Core , there are tons of documentation about its usage, but I speak about back-ends. EFCore (Entity Framework Core) relies on providers to communicate with back-ends, the full list is available here .
The question is:
Can EFCore use Apache Kafka as back-end?
The short answer is yes and long answer is KEFCore: Entity Framework Core provider for Apache Kafka .
KEFCore is a provider able to use Apache Kafka as back-end for Entity Framework Core.
Model definition
The model used in the example is the same available here , the difference is in the provider requested: in the example of the repository it is used an Apache Kafka cluster inheriting from KafkaDbContext :
public class BloggingContext : KafkaDbContext { public DbSet < Blog > Blogs { get ; set ; } public DbSet < Post > Posts { get ; set ; } } public class Blog { public int BlogId { get ; set ; } public string Url { get ; set ; } public long Rating { get ; set ; } public List < Post >…