Ejemplo n.º 1
0
 public static IServiceCollection Dummy <TDbContext>(this TenantDbContextIdentification <TDbContext> identification)
     where TDbContext : DbContext
 {
     return(identification._services.AddSingleton <IDbContextTenantStrategy <TDbContext>, DummyTenantDbContext <TDbContext> >());
 }
Ejemplo n.º 2
0
 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)));
 }
Ejemplo n.º 3
0
 public static IServiceCollection AllowDifferentSchemaForTenant <TDbContext>(this TenantDbContextIdentification <TDbContext> identification)
     where TDbContext : DbContext
 {
     return(identification._services.AddSingleton <IDbContextTenantStrategy <TDbContext>, DifferentSchemaTenantDbContex <TDbContext> >());
 }