Class MemoryDbRepository<TMemoryDbContext, TEntity>
Inheritance
object
MemoryDbRepository<TMemoryDbContext, TEntity>
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Assembly: Volo.Abp.MemoryDb.dll
Syntax
public class MemoryDbRepository<TMemoryDbContext, TEntity> : RepositoryBase<TEntity>, IServiceProviderAccessor, IUnitOfWorkEnabled, IUnitOfWorkManagerAccessor, IMemoryDbRepository<TEntity>, IRepository<TEntity>, IReadOnlyRepository<TEntity>, IBasicRepository<TEntity>, IReadOnlyBasicRepository<TEntity>, IRepository where TMemoryDbContext : MemoryDbContext where TEntity : class, IEntity
Type Parameters
| Name |
Description |
| TMemoryDbContext |
|
| TEntity |
|
Constructors
MemoryDbRepository(IMemoryDatabaseProvider<TMemoryDbContext>)
Declaration
public MemoryDbRepository(IMemoryDatabaseProvider<TMemoryDbContext> databaseProvider)
Parameters
Properties
AuditPropertySetter
Declaration
public IAuditPropertySetter AuditPropertySetter { get; }
Property Value
Collection
Declaration
[Obsolete("Use GetCollectionAsync method.")]
public virtual IMemoryDatabaseCollection<TEntity> Collection { get; }
Property Value
Database
Declaration
[Obsolete("Use GetDatabaseAsync method.")]
public virtual IMemoryDatabase Database { get; }
Property Value
DatabaseProvider
Declaration
protected IMemoryDatabaseProvider<TMemoryDbContext> DatabaseProvider { get; }
Property Value
DistributedEventBus
Declaration
public IDistributedEventBus DistributedEventBus { get; }
Property Value
EntityChangeEventHelper
Declaration
public IEntityChangeEventHelper EntityChangeEventHelper { get; }
Property Value
GuidGenerator
Declaration
public IGuidGenerator GuidGenerator { get; }
Property Value
LocalEventBus
Declaration
public ILocalEventBus LocalEventBus { get; }
Property Value
Methods
ApplyAbpConceptsForAddedEntity(TEntity)
Declaration
protected virtual void ApplyAbpConceptsForAddedEntity(TEntity entity)
Parameters
| Type |
Name |
Description |
| TEntity |
entity |
|
ApplyAbpConceptsForDeletedEntity(TEntity)
Declaration
protected virtual void ApplyAbpConceptsForDeletedEntity(TEntity entity)
Parameters
| Type |
Name |
Description |
| TEntity |
entity |
|
CheckAndSetId(TEntity)
Declaration
protected virtual void CheckAndSetId(TEntity entity)
Parameters
| Type |
Name |
Description |
| TEntity |
entity |
|
DeleteAsync(TEntity, bool, CancellationToken)
Declaration
public override 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 |
|
Overrides
Volo.Abp.Domain.Repositories.BasicRepositoryBase<TEntity>.DeleteAsync(TEntity, bool, System.Threading.CancellationToken)
DeleteAsync(Expression<Func<TEntity, bool>>, bool, CancellationToken)
Declaration
public override Task DeleteAsync(Expression<Func<TEntity, bool>> predicate, bool autoSave = false, CancellationToken cancellationToken = default)
Parameters
| Type |
Name |
Description |
| System.Linq.Expressions.Expression<TDelegate><System.Func<T, TResult><TEntity, bool>> |
predicate |
|
| bool |
autoSave |
|
| System.Threading.CancellationToken |
cancellationToken |
|
Returns
| Type |
Description |
| System.Threading.Tasks.Task |
|
Overrides
Volo.Abp.Domain.Repositories.RepositoryBase<TEntity>.DeleteAsync(System.Linq.Expressions.Expression<System.Func<TEntity, bool>>, bool, System.Threading.CancellationToken)
FindAsync(Expression<Func<TEntity, bool>>, bool, CancellationToken)
Declaration
public override Task<TEntity> FindAsync(Expression<Func<TEntity, bool>> predicate, bool includeDetails = true, 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><TEntity> |
|
Overrides
Volo.Abp.Domain.Repositories.RepositoryBase<TEntity>.FindAsync(System.Linq.Expressions.Expression<System.Func<TEntity, bool>>, bool, System.Threading.CancellationToken)
GetCollectionAsync()
Declaration
public Task<IMemoryDatabaseCollection<TEntity>> GetCollectionAsync()
Returns
GetCountAsync(CancellationToken)
Declaration
public override Task<long> GetCountAsync(CancellationToken cancellationToken = default)
Parameters
| Type |
Name |
Description |
| System.Threading.CancellationToken |
cancellationToken |
|
Returns
| Type |
Description |
| System.Threading.Tasks.Task<TResult><long> |
|
Overrides
Volo.Abp.Domain.Repositories.BasicRepositoryBase<TEntity>.GetCountAsync(System.Threading.CancellationToken)
GetDatabaseAsync()
Declaration
public Task<IMemoryDatabase> GetDatabaseAsync()
Returns
GetListAsync(bool, CancellationToken)
Declaration
public override 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>> |
|
Overrides
Volo.Abp.Domain.Repositories.BasicRepositoryBase<TEntity>.GetListAsync(bool, System.Threading.CancellationToken)
GetListAsync(Expression<Func<TEntity, bool>>, bool, CancellationToken)
Declaration
public override 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>> |
|
Overrides
Volo.Abp.Domain.Repositories.BasicRepositoryBase<TEntity>.GetListAsync(System.Linq.Expressions.Expression<System.Func<TEntity, bool>>, bool, System.Threading.CancellationToken)
GetPagedListAsync(int, int, string, bool, CancellationToken)
Declaration
public override 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>> |
|
Overrides
Volo.Abp.Domain.Repositories.BasicRepositoryBase<TEntity>.GetPagedListAsync(int, int, string, bool, System.Threading.CancellationToken)
GetQueryable()
Declaration
[Obsolete("This method will be removed in future versions.")]
protected override IQueryable<TEntity> GetQueryable()
Returns
| Type |
Description |
| System.Linq.IQueryable<T><TEntity> |
|
Overrides
Volo.Abp.Domain.Repositories.RepositoryBase<TEntity>.GetQueryable()
GetQueryableAsync()
Declaration
public override Task<IQueryable<TEntity>> GetQueryableAsync()
Returns
| Type |
Description |
| System.Threading.Tasks.Task<TResult><System.Linq.IQueryable<T><TEntity>> |
|
Overrides
Volo.Abp.Domain.Repositories.RepositoryBase<TEntity>.GetQueryableAsync()
InsertAsync(TEntity, bool, CancellationToken)
Declaration
public override 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> |
|
Overrides
Volo.Abp.Domain.Repositories.BasicRepositoryBase<TEntity>.InsertAsync(TEntity, bool, System.Threading.CancellationToken)
IsHardDeleted(TEntity)
Declaration
protected virtual bool IsHardDeleted(TEntity entity)
Parameters
| Type |
Name |
Description |
| TEntity |
entity |
|
Returns
SetCreationAuditProperties(TEntity)
Declaration
protected virtual void SetCreationAuditProperties(TEntity entity)
Parameters
| Type |
Name |
Description |
| TEntity |
entity |
|
SetDeletionAuditProperties(TEntity)
Declaration
protected virtual void SetDeletionAuditProperties(TEntity entity)
Parameters
| Type |
Name |
Description |
| TEntity |
entity |
|
SetModificationAuditProperties(TEntity)
Declaration
protected virtual void SetModificationAuditProperties(TEntity entity)
Parameters
| Type |
Name |
Description |
| TEntity |
entity |
|
TriggerDomainEvents(object)
Declaration
protected virtual void TriggerDomainEvents(object entity)
Parameters
| Type |
Name |
Description |
| object |
entity |
|
TriggerEntityCreateEvents(TEntity)
Declaration
protected virtual void TriggerEntityCreateEvents(TEntity entity)
Parameters
| Type |
Name |
Description |
| TEntity |
entity |
|
TriggerEntityDeleteEvents(TEntity)
Declaration
protected virtual void TriggerEntityDeleteEvents(TEntity entity)
Parameters
| Type |
Name |
Description |
| TEntity |
entity |
|
TriggerEntityUpdateEvents(TEntity)
Declaration
protected virtual void TriggerEntityUpdateEvents(TEntity entity)
Parameters
| Type |
Name |
Description |
| TEntity |
entity |
|
TrySetGuidId(IEntity<Guid>)
Declaration
protected virtual void TrySetGuidId(IEntity<Guid> entity)
Parameters
| Type |
Name |
Description |
| IEntity<System.Guid> |
entity |
|
UpdateAsync(TEntity, bool, CancellationToken)
Declaration
public override 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> |
|
Overrides
Volo.Abp.Domain.Repositories.BasicRepositoryBase<TEntity>.UpdateAsync(TEntity, bool, System.Threading.CancellationToken)
Implements
Extension Methods