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

LazyServiceProvider

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

ServiceProvider

Declaration
public IServiceProvider ServiceProvider { get; set; }
Property Value
Type Description
System.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
System.Threading.CancellationToken cancellationToken
Returns
Type Description
System.Threading.Tasks.Task

DeleteManyAsync(IEnumerable<TEntity>, bool, CancellationToken)

Declaration
public virtual Task DeleteManyAsync(IEnumerable<TEntity> entities, bool autoSave = false, CancellationToken cancellationToken = default)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<T><TEntity> entities
bool autoSave
System.Threading.CancellationToken cancellationToken
Returns
Type Description
System.Threading.Tasks.Task

GetCancellationToken(CancellationToken)

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

GetCountAsync(CancellationToken)

Declaration
public abstract Task<long> GetCountAsync(CancellationToken cancellationToken = default)
Parameters
Type Name Description
System.Threading.CancellationToken cancellationToken
Returns
Type Description
System.Threading.Tasks.Task<TResult><long>

GetListAsync(bool, CancellationToken)

Declaration
public abstract Task<List<TEntity>> GetListAsync(bool includeDetails = false, CancellationToken cancellationToken = default)
Parameters
Type Name Description
bool includeDetails
System.Threading.CancellationToken cancellationToken
Returns
Type Description
System.Threading.Tasks.Task<TResult><System.Collections.Generic.List<T><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
System.Linq.Expressions.Expression<TDelegate><System.Func<T, TResult><TEntity, bool>> predicate
bool includeDetails
System.Threading.CancellationToken cancellationToken
Returns
Type Description
System.Threading.Tasks.Task<TResult><System.Collections.Generic.List<T><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
System.Threading.CancellationToken cancellationToken
Returns
Type Description
System.Threading.Tasks.Task<TResult><System.Collections.Generic.List<T><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
System.Threading.CancellationToken cancellationToken
Returns
Type Description
System.Threading.Tasks.Task<TResult><TEntity>

InsertManyAsync(IEnumerable<TEntity>, bool, CancellationToken)

Declaration
public virtual Task InsertManyAsync(IEnumerable<TEntity> entities, bool autoSave = false, CancellationToken cancellationToken = default)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<T><TEntity> entities
bool autoSave
System.Threading.CancellationToken cancellationToken
Returns
Type Description
System.Threading.Tasks.Task

SaveChangesAsync(CancellationToken)

Declaration
protected virtual Task SaveChangesAsync(CancellationToken cancellationToken)
Parameters
Type Name Description
System.Threading.CancellationToken cancellationToken
Returns
Type Description
System.Threading.Tasks.Task

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
System.Threading.CancellationToken cancellationToken
Returns
Type Description
System.Threading.Tasks.Task<TResult><TEntity>

UpdateManyAsync(IEnumerable<TEntity>, bool, CancellationToken)

Declaration
public virtual Task UpdateManyAsync(IEnumerable<TEntity> entities, bool autoSave = false, CancellationToken cancellationToken = default)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<T><TEntity> entities
bool autoSave
System.Threading.CancellationToken cancellationToken
Returns
Type Description
System.Threading.Tasks.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>>)
LockExtensions.Locking<T>(T, Action<T>)
LockExtensions.Locking<T, TResult>(T, Func<T, TResult>)
In This Article
Back to top Powered by Volosoft