Show / Hide Table of Contents

Class EfCoreTenantRepository

Inheritance
object
BasicRepositoryBase<Tenant>
RepositoryBase<Tenant>
EfCoreRepository<ISaasDbContext, Tenant>
EfCoreRepository<ISaasDbContext, Tenant, Guid>
EfCoreTenantRepository
Implements
IServiceProviderAccessor
IUnitOfWorkEnabled
IUnitOfWorkManagerAccessor
IEfCoreRepository<Tenant, Guid>
IEfCoreRepository<Tenant>
IRepository<Tenant, Guid>
IRepository<Tenant>
IReadOnlyRepository<Tenant, Guid>
IReadOnlyRepository<Tenant>
IBasicRepository<Tenant, Guid>
ISupportsExplicitLoading<Tenant>
ITenantRepository
IBasicRepository<Tenant, Guid>
IBasicRepository<Tenant>
IReadOnlyBasicRepository<Tenant, Guid>
IReadOnlyBasicRepository<Tenant>
IRepository
Inherited Members
EfCoreRepository<ISaasDbContext, Tenant, Guid>.GetAsync(Guid, bool, CancellationToken)
EfCoreRepository<ISaasDbContext, Tenant, Guid>.FindAsync(Guid, bool, CancellationToken)
EfCoreRepository<ISaasDbContext, Tenant, Guid>.DeleteAsync(Guid, bool, CancellationToken)
EfCoreRepository<ISaasDbContext, Tenant, Guid>.DeleteManyAsync(IEnumerable<Guid>, bool, CancellationToken)
EfCoreRepository<ISaasDbContext, Tenant>.GetDbContextAsync()
EfCoreRepository<ISaasDbContext, Tenant>.GetDbSetAsync()
EfCoreRepository<ISaasDbContext, Tenant>.GetDbConnectionAsync()
EfCoreRepository<ISaasDbContext, Tenant>.GetDbTransactionAsync()
EfCoreRepository<ISaasDbContext, Tenant>.InsertAsync(Tenant, bool, CancellationToken)
EfCoreRepository<ISaasDbContext, Tenant>.InsertManyAsync(IEnumerable<Tenant>, bool, CancellationToken)
EfCoreRepository<ISaasDbContext, Tenant>.UpdateAsync(Tenant, bool, CancellationToken)
EfCoreRepository<ISaasDbContext, Tenant>.UpdateManyAsync(IEnumerable<Tenant>, bool, CancellationToken)
EfCoreRepository<ISaasDbContext, Tenant>.DeleteAsync(Tenant, bool, CancellationToken)
EfCoreRepository<ISaasDbContext, Tenant>.DeleteManyAsync(IEnumerable<Tenant>, bool, CancellationToken)
EfCoreRepository<ISaasDbContext, Tenant>.GetListAsync(bool, CancellationToken)
EfCoreRepository<ISaasDbContext, Tenant>.GetListAsync(Expression<Func<Tenant, bool>>, bool, CancellationToken)
EfCoreRepository<ISaasDbContext, Tenant>.GetCountAsync(CancellationToken)
EfCoreRepository<ISaasDbContext, Tenant>.GetPagedListAsync(int, int, string, bool, CancellationToken)
EfCoreRepository<ISaasDbContext, Tenant>.GetQueryable()
EfCoreRepository<ISaasDbContext, Tenant>.GetQueryableAsync()
EfCoreRepository<ISaasDbContext, Tenant>.SaveChangesAsync(CancellationToken)
EfCoreRepository<ISaasDbContext, Tenant>.FindAsync(Expression<Func<Tenant, bool>>, bool, CancellationToken)
EfCoreRepository<ISaasDbContext, Tenant>.DeleteAsync(Expression<Func<Tenant, bool>>, bool, CancellationToken)
EfCoreRepository<ISaasDbContext, Tenant>.DeleteDirectAsync(Expression<Func<Tenant, bool>>, CancellationToken)
EfCoreRepository<ISaasDbContext, Tenant>.EnsureCollectionLoadedAsync<TProperty>(Tenant, Expression<Func<Tenant, IEnumerable<TProperty>>>, CancellationToken)
EfCoreRepository<ISaasDbContext, Tenant>.EnsurePropertyLoadedAsync<TProperty>(Tenant, Expression<Func<Tenant, TProperty>>, CancellationToken)
EfCoreRepository<ISaasDbContext, Tenant>.WithDetails()
EfCoreRepository<ISaasDbContext, Tenant>.WithDetailsAsync()
EfCoreRepository<ISaasDbContext, Tenant>.WithDetails(params Expression<Func<Tenant, object>>[])
EfCoreRepository<ISaasDbContext, Tenant>.WithDetailsAsync(params Expression<Func<Tenant, object>>[])
EfCoreRepository<ISaasDbContext, Tenant>.CheckAndSetId(Tenant)
EfCoreRepository<ISaasDbContext, Tenant>.TrySetGuidId(IEntity<Guid>)
EfCoreRepository<ISaasDbContext, Tenant>.DbContext
EfCoreRepository<ISaasDbContext, Tenant>.DbSet
EfCoreRepository<ISaasDbContext, Tenant>.AbpEntityOptions
EfCoreRepository<ISaasDbContext, Tenant>.GuidGenerator
EfCoreRepository<ISaasDbContext, Tenant>.BulkOperationProvider
RepositoryBase<Tenant>.WithDetails(params Expression<Func<Tenant, object>>[])
RepositoryBase<Tenant>.WithDetailsAsync(params Expression<Func<Tenant, object>>[])
RepositoryBase<Tenant>.GetQueryable()
RepositoryBase<Tenant>.GetQueryableAsync()
RepositoryBase<Tenant>.FindAsync(Expression<Func<Tenant, bool>>, bool, CancellationToken)
RepositoryBase<Tenant>.GetAsync(Expression<Func<Tenant, bool>>, bool, CancellationToken)
RepositoryBase<Tenant>.DeleteAsync(Expression<Func<Tenant, bool>>, bool, CancellationToken)
RepositoryBase<Tenant>.DeleteDirectAsync(Expression<Func<Tenant, bool>>, CancellationToken)
RepositoryBase<Tenant>.ApplyDataFilters<TQueryable>(TQueryable)
RepositoryBase<Tenant>.ApplyDataFilters<TQueryable, TOtherEntity>(TQueryable)
BasicRepositoryBase<Tenant>.InsertAsync(Tenant, bool, CancellationToken)
BasicRepositoryBase<Tenant>.InsertManyAsync(IEnumerable<Tenant>, bool, CancellationToken)
BasicRepositoryBase<Tenant>.SaveChangesAsync(CancellationToken)
BasicRepositoryBase<Tenant>.UpdateAsync(Tenant, bool, CancellationToken)
BasicRepositoryBase<Tenant>.UpdateManyAsync(IEnumerable<Tenant>, bool, CancellationToken)
BasicRepositoryBase<Tenant>.DeleteAsync(Tenant, bool, CancellationToken)
BasicRepositoryBase<Tenant>.DeleteManyAsync(IEnumerable<Tenant>, bool, CancellationToken)
BasicRepositoryBase<Tenant>.GetListAsync(bool, CancellationToken)
BasicRepositoryBase<Tenant>.GetListAsync(Expression<Func<Tenant, bool>>, bool, CancellationToken)
BasicRepositoryBase<Tenant>.GetCountAsync(CancellationToken)
BasicRepositoryBase<Tenant>.GetPagedListAsync(int, int, string, bool, CancellationToken)
BasicRepositoryBase<Tenant>.GetCancellationToken(CancellationToken)
BasicRepositoryBase<Tenant>.ShouldTrackingEntityChange()
BasicRepositoryBase<Tenant>.LazyServiceProvider
BasicRepositoryBase<Tenant>.ServiceProvider
BasicRepositoryBase<Tenant>.DataFilter
BasicRepositoryBase<Tenant>.CurrentTenant
BasicRepositoryBase<Tenant>.AsyncExecuter
BasicRepositoryBase<Tenant>.UnitOfWorkManager
BasicRepositoryBase<Tenant>.CancellationTokenProvider
BasicRepositoryBase<Tenant>.LoggerFactory
BasicRepositoryBase<Tenant>.Logger
BasicRepositoryBase<Tenant>.EntityChangeTrackingProvider
BasicRepositoryBase<Tenant>.IsChangeTrackingEnabled
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: Volo.Saas.EntityFrameworkCore
Assembly: Volo.Saas.EntityFrameworkCore.dll
Syntax
public class EfCoreTenantRepository : EfCoreRepository<ISaasDbContext, Tenant, Guid>, IServiceProviderAccessor, IUnitOfWorkEnabled, IUnitOfWorkManagerAccessor, IEfCoreRepository<Tenant, Guid>, IEfCoreRepository<Tenant>, IRepository<Tenant, Guid>, IRepository<Tenant>, IReadOnlyRepository<Tenant, Guid>, IReadOnlyRepository<Tenant>, IBasicRepository<Tenant, Guid>, ISupportsExplicitLoading<Tenant>, ITenantRepository, IBasicRepository<Tenant, Guid>, IBasicRepository<Tenant>, IReadOnlyBasicRepository<Tenant, Guid>, IReadOnlyBasicRepository<Tenant>, IRepository

Constructors

EfCoreTenantRepository(IDbContextProvider<ISaasDbContext>)

Declaration
public EfCoreTenantRepository(IDbContextProvider<ISaasDbContext> dbContextProvider)
Parameters
Type Name Description
IDbContextProvider<ISaasDbContext> dbContextProvider

Methods

FindById(Guid, bool)

Declaration
[Obsolete("Use FindByIdAsync method.")]
public Tenant FindById(Guid id, bool includeDetails = true)
Parameters
Type Name Description
Guid id
bool includeDetails
Returns
Type Description
Tenant

FindByIdAsync(Guid, bool, CancellationToken)

Declaration
public virtual Task<Tenant> FindByIdAsync(Guid id, bool includeDetails = true, CancellationToken cancellationToken = default)
Parameters
Type Name Description
Guid id
bool includeDetails
CancellationToken cancellationToken
Returns
Type Description
Task<Tenant>

FindByName(string, bool)

Declaration
[Obsolete("Use FindByNameAsync method.")]
public Tenant FindByName(string normalizedName, bool includeDetails = true)
Parameters
Type Name Description
string normalizedName
bool includeDetails
Returns
Type Description
Tenant

FindByNameAsync(string, bool, CancellationToken)

Declaration
public virtual Task<Tenant> FindByNameAsync(string normalizedName, bool includeDetails = true, CancellationToken cancellationToken = default)
Parameters
Type Name Description
string normalizedName
bool includeDetails
CancellationToken cancellationToken
Returns
Type Description
Task<Tenant>

GetCountAsync(string, Guid?, DateTime?, DateTime?, TenantActivationState?, DateTime?, DateTime?, CancellationToken)

Declaration
public virtual Task<long> GetCountAsync(string filter = null, Guid? editionId = null, DateTime? expirationDateMin = null, DateTime? expirationDateMax = null, TenantActivationState? tenantActivationState = null, DateTime? activationEndDateMin = null, DateTime? activationEndDateMax = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
string filter
Guid? editionId
DateTime? expirationDateMin
DateTime? expirationDateMax
TenantActivationState? tenantActivationState
DateTime? activationEndDateMin
DateTime? activationEndDateMax
CancellationToken cancellationToken
Returns
Type Description
Task<long>

GetListAsync(string, int, int, string, bool, Guid?, DateTime?, DateTime?, TenantActivationState?, DateTime?, DateTime?, CancellationToken)

Declaration
public virtual Task<List<Tenant>> GetListAsync(string sorting = null, int maxResultCount = 2147483647, int skipCount = 0, string filter = null, bool includeDetails = false, Guid? editionId = null, DateTime? expirationDateMin = null, DateTime? expirationDateMax = null, TenantActivationState? tenantActivationState = null, DateTime? activationEndDateMin = null, DateTime? activationEndDateMax = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
string sorting
int maxResultCount
int skipCount
string filter
bool includeDetails
Guid? editionId
DateTime? expirationDateMin
DateTime? expirationDateMax
TenantActivationState? tenantActivationState
DateTime? activationEndDateMin
DateTime? activationEndDateMax
CancellationToken cancellationToken
Returns
Type Description
Task<List<Tenant>>

GetListQueryAsync(string, Guid?, DateTime?, DateTime?, TenantActivationState?, DateTime?, DateTime?, CancellationToken)

Declaration
protected virtual Task<IQueryable<Tenant>> GetListQueryAsync(string filter = null, Guid? editionId = null, DateTime? expirationDateMin = null, DateTime? expirationDateMax = null, TenantActivationState? tenantActivationState = null, DateTime? activationEndDateMin = null, DateTime? activationEndDateMax = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
string filter
Guid? editionId
DateTime? expirationDateMin
DateTime? expirationDateMax
TenantActivationState? tenantActivationState
DateTime? activationEndDateMin
DateTime? activationEndDateMax
CancellationToken cancellationToken
Returns
Type Description
Task<IQueryable<Tenant>>

GetListWithSeparateConnectionStringAsync(string, bool, CancellationToken)

Declaration
public virtual Task<List<Tenant>> GetListWithSeparateConnectionStringAsync(string connectionName = "Default", bool includeDetails = false, CancellationToken cancellationToken = default)
Parameters
Type Name Description
string connectionName
bool includeDetails
CancellationToken cancellationToken
Returns
Type Description
Task<List<Tenant>>

UpdateEditionsAsync(Guid, Guid?, CancellationToken)

Declaration
public virtual Task UpdateEditionsAsync(Guid sourceEditionId, Guid? targetEditionId = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
Guid sourceEditionId
Guid? targetEditionId
CancellationToken cancellationToken
Returns
Type Description
Task

WithDetails()

Declaration
[Obsolete("Use WithDetailsAsync method.")]
public override IQueryable<Tenant> WithDetails()
Returns
Type Description
IQueryable<Tenant>
Overrides
Volo.Abp.Domain.Repositories.EntityFrameworkCore.EfCoreRepository<Volo.Saas.EntityFrameworkCore.ISaasDbContext, Volo.Saas.Tenants.Tenant>.WithDetails()

WithDetailsAsync()

Declaration
public override Task<IQueryable<Tenant>> WithDetailsAsync()
Returns
Type Description
Task<IQueryable<Tenant>>
Overrides
Volo.Abp.Domain.Repositories.EntityFrameworkCore.EfCoreRepository<Volo.Saas.EntityFrameworkCore.ISaasDbContext, Volo.Saas.Tenants.Tenant>.WithDetailsAsync()

Implements

IServiceProviderAccessor
IUnitOfWorkEnabled
IUnitOfWorkManagerAccessor
IEfCoreRepository<TEntity, TKey>
IEfCoreRepository<TEntity>
IRepository<TEntity, TKey>
IRepository<TEntity>
IReadOnlyRepository<TEntity, TKey>
IReadOnlyRepository<TEntity>
IBasicRepository<TEntity, TKey>
ISupportsExplicitLoading<TEntity>
ITenantRepository
IBasicRepository<TEntity, TKey>
IBasicRepository<TEntity>
IReadOnlyBasicRepository<TEntity, TKey>
IReadOnlyBasicRepository<TEntity>
IRepository

Extension Methods

AbpObjectExtensions.As<T>(object)
AbpObjectExtensions.To<T>(object)
LockExtensions.Locking(object, Action)
LockExtensions.Locking<TResult>(object, Func<TResult>)
AbpObjectExtensions.If<T>(T, bool, Action<T>)
AbpObjectExtensions.If<T>(T, bool, Func<T, T>)
AbpObjectExtensions.IsIn<T>(T, IEnumerable<T>)
AbpObjectExtensions.IsIn<T>(T, params T[])
AbpQueryableExtensions.OrderByIf<T, TQueryable>(TQueryable, bool, string)
AbpQueryableExtensions.PageBy<T, TQueryable>(TQueryable, int, int)
AbpQueryableExtensions.WhereIf<T, TQueryable>(TQueryable, bool, Expression<Func<T, bool>>)
AbpQueryableExtensions.WhereIf<T, TQueryable>(TQueryable, bool, Expression<Func<T, int, bool>>)
AbpOpenIddictQueryableExtensions.SkipIf<T, TQueryable>(TQueryable, bool, int?)
AbpOpenIddictQueryableExtensions.TakeIf<T, TQueryable>(TQueryable, bool, int?)
LockExtensions.Locking<T>(T, Action<T>)
LockExtensions.Locking<T, TResult>(T, Func<T, TResult>)
In this article
Back to top Powered by ABP.IO Platform