How to use database sharding with EF Core and C#

  • Thread starter Thread starter PaulMeems
  • Start date Start date
P

PaulMeems

Guest
Also asked at How to use database sharding with EF Core and C#"

I'm trying to implement horizontal sharding with EF Core and .NET Core (every customer will have its own database).
I've got this working with EF6 and .NET Framework.

I'm looking for a full example, which I can't find.
I'm especially interested in what to put in Startup.cs

I have this for my master database:
services.AddDbContextPool<MasterContext>(options => options.UseSqlServer(Configuration.GetConnectionString("MasterConnection")));
What to put for my TenantContext since it will change with every tenant?

Also how will my TenantContext look like?

Continue reading...
 
Back
Top