Hangfire - Multi tenant, ASP.NET Core - Resolving the correct tenant
I got a SaaS project that needs the use Hangfire. We already implemented the requirements to identify a tenant. Architecture Persistence Layer Each tenant has it's own database .NET Core We already have a service TenantCurrentService which returns the ID of the tenant, from a list of source [hostname, query string, etc] We already have a DbContextFactory for Entity Framework which return a DB context with the correct connection string for the client We are currently using ASP.NET Core DI (willing to change if that helps) Hangfire Using single storage (eg: Postgresql), no matter the tenant