Class BasicRepositoryBase<TEntity>
Inheritance
System.Object
BasicRepositoryBase<TEntity>
Implements
IServiceProviderAccessor
ITransientDependency
Assembly: Volo.Abp.Ddd.Domain.dll
Syntax
public abstract class BasicRepositoryBase<TEntity> : object, IBasicRepository<TEntity>, IReadOnlyBasicRepository<TEntity>, IRepository, IServiceProviderAccessor, IUnitOfWorkEnabled, ITransientDependency where TEntity : class, IEntity
Type Parameters
Constructors
BasicRepositoryBase()
Declaration
protected BasicRepositoryBase()
Properties
CancellationTokenProvider
Declaration
public ICancellationTokenProvider CancellationTokenProvider { get; set; }
Property Value
ServiceProvider
Declaration
public IServiceProvider ServiceProvider { get; set; }
Property Value
Type |
Description |
IServiceProvider |
|
Methods
DeleteAsync(TEntity, Boolean, CancellationToken)
Declaration
public abstract Task DeleteAsync(TEntity entity, bool autoSave = false, CancellationToken cancellationToken = null)
Parameters
Type |
Name |
Description |
TEntity |
entity |
|
System.Boolean |
autoSave |
|
CancellationToken |
cancellationToken |
|
Returns
GetCancellationToken(CancellationToken)
Declaration
protected virtual CancellationToken GetCancellationToken(CancellationToken preferredValue = null)
Parameters
Type |
Name |
Description |
CancellationToken |
preferredValue |
|
Returns
Type |
Description |
CancellationToken |
|
GetCountAsync(CancellationToken)
Declaration
public abstract Task<long> GetCountAsync(CancellationToken cancellationToken = null)
Parameters
Type |
Name |
Description |
CancellationToken |
cancellationToken |
|
Returns
Type |
Description |
Task<System.Int64> |
|
GetListAsync(Boolean, CancellationToken)
Declaration
public abstract Task<List<TEntity>> GetListAsync(bool includeDetails = false, CancellationToken cancellationToken = null)
Parameters
Type |
Name |
Description |
System.Boolean |
includeDetails |
|
CancellationToken |
cancellationToken |
|
Returns
Type |
Description |
Task<List<TEntity>> |
|
GetPagedListAsync(Int32, Int32, String, Boolean, CancellationToken)
Declaration
public abstract Task<List<TEntity>> GetPagedListAsync(int skipCount, int maxResultCount, string sorting, bool includeDetails = false, CancellationToken cancellationToken = null)
Parameters
Type |
Name |
Description |
System.Int32 |
skipCount |
|
System.Int32 |
maxResultCount |
|
System.String |
sorting |
|
System.Boolean |
includeDetails |
|
CancellationToken |
cancellationToken |
|
Returns
Type |
Description |
Task<List<TEntity>> |
|
InsertAsync(TEntity, Boolean, CancellationToken)
Declaration
public abstract Task<TEntity> InsertAsync(TEntity entity, bool autoSave = false, CancellationToken cancellationToken = null)
Parameters
Type |
Name |
Description |
TEntity |
entity |
|
System.Boolean |
autoSave |
|
CancellationToken |
cancellationToken |
|
Returns
Type |
Description |
Task<TEntity> |
|
UpdateAsync(TEntity, Boolean, CancellationToken)
Declaration
public abstract Task<TEntity> UpdateAsync(TEntity entity, bool autoSave = false, CancellationToken cancellationToken = null)
Parameters
Type |
Name |
Description |
TEntity |
entity |
|
System.Boolean |
autoSave |
|
CancellationToken |
cancellationToken |
|
Returns
Type |
Description |
Task<TEntity> |
|
Implements
IServiceProviderAccessor
ITransientDependency
Extension Methods