Show / Hide Table of Contents

Class BasicRepositoryBase<TEntity>

Inheritance
object
BasicRepositoryBase<TEntity>
BasicRepositoryBase<TEntity, TKey>
RepositoryBase<TEntity>
Implements
IBasicRepository<TEntity>
IReadOnlyBasicRepository<TEntity>
IRepository
IServiceProviderAccessor
IUnitOfWorkEnabled
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: Volo.Abp.Domain.Repositories
Assembly: Volo.Abp.Ddd.Domain.dll
Syntax
public abstract class BasicRepositoryBase<TEntity> : IBasicRepository<TEntity>, IReadOnlyBasicRepository<TEntity>, IRepository, IServiceProviderAccessor, IUnitOfWorkEnabled where TEntity : class, IEntity
Type Parameters
Name Description
TEntity

Constructors

BasicRepositoryBase()

Declaration
protected BasicRepositoryBase()

Properties

AsyncExecuter

Declaration
public IAsyncQueryableExecuter AsyncExecuter { get; }
Property Value
Type Description
IAsyncQueryableExecuter

CancellationTokenProvider

Declaration
public ICancellationTokenProvider CancellationTokenProvider { get; }
Property Value
Type Description
ICancellationTokenProvider

CurrentTenant

Declaration
public ICurrentTenant CurrentTenant { get; }
Property Value
Type Description
ICurrentTenant

DataFilter

Declaration
public IDataFilter DataFilter { get; }
Property Value
Type Description
IDataFilter

EntityChangeTrackingProvider

Declaration
public IEntityChangeTrackingProvider EntityChangeTrackingProvider { get; }
Property Value
Type Description
IEntityChangeTrackingProvider

IsChangeTrackingEnabled

Declaration
public bool? IsChangeTrackingEnabled { get; protected set; }
Property Value
Type Description
bool?

LazyServiceProvider

Declaration
public IAbpLazyServiceProvider LazyServiceProvider { get; set; }
Property Value
Type Description
IAbpLazyServiceProvider

Logger

Declaration
public ILogger Logger { get; }
Property Value
Type Description
ILogger

LoggerFactory

Declaration
public ILoggerFactory? LoggerFactory { get; }
Property Value
Type Description
ILoggerFactory

ServiceProvider

Declaration
public IServiceProvider ServiceProvider { get; set; }
Property Value
Type Description
IServiceProvider

UnitOfWorkManager

Declaration
public IUnitOfWorkManager UnitOfWorkManager { get; }
Property Value
Type Description
IUnitOfWorkManager

Methods

DeleteAsync(TEntity, bool, CancellationToken)

Declaration
public abstract Task DeleteAsync(TEntity entity, bool autoSave = false, CancellationToken cancellationToken = default)
Parameters
Type Name Description
TEntity entity
bool autoSave
CancellationToken cancellationToken
Returns
Type Description
Task

DeleteManyAsync(IEnumerable<TEntity>, bool, CancellationToken)

Declaration
public virtual Task DeleteManyAsync(IEnumerable<TEntity> entities, bool autoSave = false, CancellationToken cancellationToken = default)
Parameters
Type Name Description
IEnumerable<TEntity> entities
bool autoSave
CancellationToken cancellationToken
Returns
Type Description
Task

GetCancellationToken(CancellationToken)

Declaration
protected virtual CancellationToken GetCancellationToken(CancellationToken preferredValue = default)
Parameters
Type Name Description
CancellationToken preferredValue
Returns
Type Description
CancellationToken

GetCountAsync(CancellationToken)

Declaration
public abstract Task<long> GetCountAsync(CancellationToken cancellationToken = default)
Parameters
Type Name Description
CancellationToken cancellationToken
Returns
Type Description
Task<long>

GetListAsync(bool, CancellationToken)

Declaration
public abstract Task<List<TEntity>> GetListAsync(bool includeDetails = false, CancellationToken cancellationToken = default)
Parameters
Type Name Description
bool includeDetails
CancellationToken cancellationToken
Returns
Type Description
Task<List<TEntity>>

GetListAsync(Expression<Func<TEntity, bool>>, bool, CancellationToken)

Declaration
public abstract Task<List<TEntity>> GetListAsync(Expression<Func<TEntity, bool>> predicate, bool includeDetails = false, CancellationToken cancellationToken = default)
Parameters
Type Name Description
Expression<Func<TEntity, bool>> predicate
bool includeDetails
CancellationToken cancellationToken
Returns
Type Description
Task<List<TEntity>>

GetPagedListAsync(int, int, string, bool, CancellationToken)

Declaration
public abstract Task<List<TEntity>> GetPagedListAsync(int skipCount, int maxResultCount, string sorting, bool includeDetails = false, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int skipCount
int maxResultCount
string sorting
bool includeDetails
CancellationToken cancellationToken
Returns
Type Description
Task<List<TEntity>>

InsertAsync(TEntity, bool, CancellationToken)

Declaration
public abstract Task<TEntity> InsertAsync(TEntity entity, bool autoSave = false, CancellationToken cancellationToken = default)
Parameters
Type Name Description
TEntity entity
bool autoSave
CancellationToken cancellationToken
Returns
Type Description
Task<TEntity>

InsertManyAsync(IEnumerable<TEntity>, bool, CancellationToken)

Declaration
public virtual Task InsertManyAsync(IEnumerable<TEntity> entities, bool autoSave = false, CancellationToken cancellationToken = default)
Parameters
Type Name Description
IEnumerable<TEntity> entities
bool autoSave
CancellationToken cancellationToken
Returns
Type Description
Task

SaveChangesAsync(CancellationToken)

Declaration
protected virtual Task SaveChangesAsync(CancellationToken cancellationToken)
Parameters
Type Name Description
CancellationToken cancellationToken
Returns
Type Description
Task

ShouldTrackingEntityChange()

Declaration
protected virtual bool ShouldTrackingEntityChange()
Returns
Type Description
bool

UpdateAsync(TEntity, bool, CancellationToken)

Declaration
public abstract Task<TEntity> UpdateAsync(TEntity entity, bool autoSave = false, CancellationToken cancellationToken = default)
Parameters
Type Name Description
TEntity entity
bool autoSave
CancellationToken cancellationToken
Returns
Type Description
Task<TEntity>

UpdateManyAsync(IEnumerable<TEntity>, bool, CancellationToken)

Declaration
public virtual Task UpdateManyAsync(IEnumerable<TEntity> entities, bool autoSave = false, CancellationToken cancellationToken = default)
Parameters
Type Name Description
IEnumerable<TEntity> entities
bool autoSave
CancellationToken cancellationToken
Returns
Type Description
Task

Implements

IBasicRepository<TEntity>
IReadOnlyBasicRepository<TEntity>
IRepository
IServiceProviderAccessor
IUnitOfWorkEnabled

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>)
RepositoryExtensions.EnsureCollectionLoadedAsync<TEntity, TProperty>(IBasicRepository<TEntity>, TEntity, Expression<Func<TEntity, IEnumerable<TProperty>>>, CancellationToken)
RepositoryExtensions.DisableTracking(IRepository)
RepositoryExtensions.EnableTracking(IRepository)
In this article
Back to top Powered by ABP.IO Platform