TenancyDbContextOptionsExtensions Class
Namespace: PTS
Assembly: PTS.EntityLayer.Tenancy.dll
Syntax
public static class TenancyDbContextOptionsExtensions
Inheritance
System.Object
TenancyDbContextOptionsExtensions
Methods
UseTenancy<TContext>(DbContextOptionsBuilder<TContext>)
Declaration
public static DbContextOptionsBuilder<TContext> UseTenancy<TContext>(this DbContextOptionsBuilder<TContext> optionsBuilder)
where TContext : DbContext, IEntityServiceProvider
Parameters
Type |
Name |
Description |
Microsoft.EntityFrameworkCore.DbContextOptionsBuilder<TContext> |
optionsBuilder |
|
Returns
Type |
Description |
Microsoft.EntityFrameworkCore.DbContextOptionsBuilder<TContext> |
|
Type Parameters
Name |
Description |
TContext |
|
UseTenancy<TContext>(DbContextOptionsBuilder<TContext>, ITenantResolver)
Declaration
public static DbContextOptionsBuilder<TContext> UseTenancy<TContext>(this DbContextOptionsBuilder<TContext> optionsBuilder, ITenantResolver resolver)
where TContext : DbContext, IEntityServiceProvider
Parameters
Type |
Name |
Description |
Microsoft.EntityFrameworkCore.DbContextOptionsBuilder<TContext> |
optionsBuilder |
|
ITenantResolver |
resolver |
|
Returns
Type |
Description |
Microsoft.EntityFrameworkCore.DbContextOptionsBuilder<TContext> |
|
Type Parameters
Name |
Description |
TContext |
|
UseTenancy<TContext>(DbContextOptionsBuilder<TContext>, IServiceProvider)
Declaration
public static DbContextOptionsBuilder<TContext> UseTenancy<TContext>(this DbContextOptionsBuilder<TContext> optionsBuilder, IServiceProvider provider)
where TContext : DbContext, IEntityServiceProvider
Parameters
Type |
Name |
Description |
Microsoft.EntityFrameworkCore.DbContextOptionsBuilder<TContext> |
optionsBuilder |
|
System.IServiceProvider |
provider |
|
Returns
Type |
Description |
Microsoft.EntityFrameworkCore.DbContextOptionsBuilder<TContext> |
|
Type Parameters
Name |
Description |
TContext |
|
UseTenancy<TContext>(DbContextOptionsBuilder<TContext>, Nullable<Int64>)
Declaration
public static DbContextOptionsBuilder<TContext> UseTenancy<TContext>(this DbContextOptionsBuilder<TContext> optionsBuilder, long? tenantId)
where TContext : DbContext, IEntityServiceProvider
Parameters
Type |
Name |
Description |
Microsoft.EntityFrameworkCore.DbContextOptionsBuilder<TContext> |
optionsBuilder |
|
System.Nullable<System.Int64> |
tenantId |
|
Returns
Type |
Description |
Microsoft.EntityFrameworkCore.DbContextOptionsBuilder<TContext> |
|
Type Parameters
Name |
Description |
TContext |
|
UseTenancy<TContext, TResolver>(DbContextOptionsBuilder<TContext>)
Declaration
public static DbContextOptionsBuilder UseTenancy<TContext, TResolver>(this DbContextOptionsBuilder<TContext> optionsBuilder)
where TContext : DbContext, IEntityServiceProvider where TResolver : class, ITenantResolver
Parameters
Type |
Name |
Description |
Microsoft.EntityFrameworkCore.DbContextOptionsBuilder<TContext> |
optionsBuilder |
|
Returns
Type |
Description |
Microsoft.EntityFrameworkCore.DbContextOptionsBuilder |
|
Type Parameters
Name |
Description |
TContext |
|
TResolver |
|
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()