Show / Hide Table of Contents

Interface IBasicRepository<TEntity>

Inherited Members
IReadOnlyBasicRepository<TEntity>.GetListAsync(Boolean, CancellationToken)
IReadOnlyBasicRepository<TEntity>.GetCountAsync(CancellationToken)
IReadOnlyBasicRepository<TEntity>.GetPagedListAsync(Int32, Int32, String, Boolean, CancellationToken)
Namespace: Volo.Abp.Domain.Repositories
Assembly: Volo.Abp.Ddd.Domain.dll
Syntax
public interface IBasicRepository<TEntity> : IReadOnlyBasicRepository<TEntity>, IRepository where TEntity : class, IEntity
Type Parameters
Name Description
TEntity

Methods

DeleteAsync(TEntity, Boolean, CancellationToken)

Deletes an entity.

Declaration
Task DeleteAsync(TEntity entity, bool autoSave = false, CancellationToken cancellationToken = null)
Parameters
Type Name Description
TEntity entity

Entity to be deleted

System.Boolean autoSave

Set true to automatically save changes to database. This is useful for ORMs / database APIs those only save changes with an explicit method call, but you need to immediately save changes to the database.

CancellationToken cancellationToken

A System.Threading.CancellationToken to observe while waiting for the task to complete.

Returns
Type Description
Task

InsertAsync(TEntity, Boolean, CancellationToken)

Inserts a new entity.

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

Inserted entity

System.Boolean autoSave

Set true to automatically save changes to database. This is useful for ORMs / database APIs those only save changes with an explicit method call, but you need to immediately save changes to the database.

CancellationToken cancellationToken

A System.Threading.CancellationToken to observe while waiting for the task to complete.

Returns
Type Description
Task<TEntity>

UpdateAsync(TEntity, Boolean, CancellationToken)

Updates an existing entity.

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

Entity

System.Boolean autoSave

Set true to automatically save changes to database. This is useful for ORMs / database APIs those only save changes with an explicit method call, but you need to immediately save changes to the database.

CancellationToken cancellationToken

A System.Threading.CancellationToken to observe while waiting for the task to complete.

Returns
Type Description
Task<TEntity>

Extension Methods

AbpObjectExtensions.As<T>(Object)
AbpObjectExtensions.To<T>(Object)
AbpObjectExtensions.IsIn<T>(T, T[])
AbpObjectExtensions.If<T>(T, Boolean, Func<T, T>)
AbpObjectExtensions.If<T>(T, Boolean, Action<T>)
LockExtensions.Locking(Object, Action)
LockExtensions.Locking<T>(T, Action<T>)
LockExtensions.Locking<TResult>(Object, Func<TResult>)
LockExtensions.Locking<T, TResult>(T, Func<T, TResult>)
Back to top Powered by Volosoft