Interface IBasicRepository<TEntity, TKey>
Inherited Members
Namespace: Volo.Abp.Domain.Repositories
Assembly: Volo.Abp.Ddd.Domain.dll
Syntax
public interface IBasicRepository<TEntity, TKey> : IBasicRepository<TEntity>, IReadOnlyBasicRepository<TEntity, TKey>, IReadOnlyBasicRepository<TEntity>, IRepository where TEntity : class, IEntity<TKey>
Type Parameters
Name | Description |
---|---|
TEntity | |
TKey |
Methods
DeleteAsync(TKey, Boolean, CancellationToken)
Deletes an entity by primary key.
Declaration
Task DeleteAsync(TKey id, bool autoSave = false, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
TKey | id | Primary key of the 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 |