public static IServiceCollection Dummy <TDbContext>(this TenantDbContextIdentification <TDbContext> identification) where TDbContext : DbContext { return(identification._services.AddSingleton <IDbContextTenantStrategy <TDbContext>, DummyTenantDbContext <TDbContext> >()); }
public static IServiceCollection DifferentConnectionForTenant <TDbContext>(this TenantDbContextIdentification <TDbContext> identification, string connectionStringName) where TDbContext : DbContext { return(identification._services.AddSingleton <IDbContextTenantStrategy <TDbContext> >(x => new DifferentConnectionTenantDbContext <TDbContext>(connectionStringName))); }
public static IServiceCollection AllowDifferentSchemaForTenant <TDbContext>(this TenantDbContextIdentification <TDbContext> identification) where TDbContext : DbContext { return(identification._services.AddSingleton <IDbContextTenantStrategy <TDbContext>, DifferentSchemaTenantDbContex <TDbContext> >()); }