Table of Contents

Interface ISet<TEntity>

Namespace
eQuantic.Core.Data.Repository
Assembly
eQuantic.Core.Data.dll

The database set interface.

public interface ISet<TEntity> : IQueryable<TEntity>, IEnumerable<TEntity>, IQueryable, IEnumerable where TEntity : class, IEntity

Type Parameters

TEntity

The type of the entity.

Inherited Members
Extension Methods

Methods

DeleteMany(Expression<Func<TEntity, bool>>)

Deletes many entities matching the supplied predicate.

long DeleteMany(Expression<Func<TEntity, bool>> filter)

Parameters

filter Expression<Func<TEntity, bool>>

The predicate.

Returns

long

The number of deleted entities.

DeleteManyAsync(Expression<Func<TEntity, bool>>, CancellationToken)

Deletes many entities matching the supplied predicate asynchronously.

Task<long> DeleteManyAsync(Expression<Func<TEntity, bool>> filter, CancellationToken cancellationToken = default)

Parameters

filter Expression<Func<TEntity, bool>>

The predicate.

cancellationToken CancellationToken

The cancellation token.

Returns

Task<long>

The number of deleted entities.

Execute()

Executes the current query.

IEnumerable<TEntity> Execute()

Returns

IEnumerable<TEntity>

The materialized entities.

FindAsync<TKey>(TKey, CancellationToken)

Finds the entity with the specified key asynchronously.

Task<TEntity?> FindAsync<TKey>(TKey key, CancellationToken cancellationToken = default)

Parameters

key TKey

The key.

cancellationToken CancellationToken

The cancellation token.

Returns

Task<TEntity>

The entity, or null when not found.

Type Parameters

TKey

The type of the key.

Find<TKey>(TKey)

Finds the entity with the specified key.

TEntity? Find<TKey>(TKey key)

Parameters

key TKey

The key.

Returns

TEntity

The entity, or null when not found.

Type Parameters

TKey

The type of the key.

Insert(TEntity)

Inserts the specified item.

void Insert(TEntity item)

Parameters

item TEntity

The item.

InsertAsync(TEntity, CancellationToken)

Inserts the specified item asynchronously.

Task InsertAsync(TEntity item, CancellationToken cancellationToken = default)

Parameters

item TEntity

The item.

cancellationToken CancellationToken

The cancellation token.

Returns

Task

UpdateMany(Expression<Func<TEntity, bool>>, Expression<Func<TEntity, TEntity>>)

Updates many entities matching the supplied predicate.

long UpdateMany(Expression<Func<TEntity, bool>> filter, Expression<Func<TEntity, TEntity>> updateExpression)

Parameters

filter Expression<Func<TEntity, bool>>

The predicate.

updateExpression Expression<Func<TEntity, TEntity>>

The update expression.

Returns

long

The number of updated entities.

UpdateManyAsync(Expression<Func<TEntity, bool>>, Expression<Func<TEntity, TEntity>>, CancellationToken)

Updates many entities matching the supplied predicate asynchronously.

Task<long> UpdateManyAsync(Expression<Func<TEntity, bool>> filter, Expression<Func<TEntity, TEntity>> updateExpression, CancellationToken cancellationToken = default)

Parameters

filter Expression<Func<TEntity, bool>>

The predicate.

updateExpression Expression<Func<TEntity, TEntity>>

The update expression.

cancellationToken CancellationToken

The cancellation token.

Returns

Task<long>

The number of updated entities.

See Also