refactor: Umbenennung der ReadAll-Methode in ReadOnly im CRUDRepository

This commit is contained in:
Developer 02 2024-09-10 11:21:21 +02:00
parent b91769d931
commit bb39b97d1e

View File

@ -57,13 +57,13 @@ namespace DigitalData.Core.Infrastructure
/// The result is not tracked by the context, which improves performance when you only need to read data without making modifications.
/// </remarks>
/// <returns>An <see cref="IQueryable{TEntity}"/> containing all entities of type <typeparamref name="TEntity"/>.</returns>
protected virtual IQueryable<TEntity> ReadAll() => _dbSet.AsNoTracking();
protected virtual IQueryable<TEntity> ReadOnly() => _dbSet.AsNoTracking();
/// <summary>
/// Asynchronously retrieves all entities of type TEntity.
/// </summary>
/// <returns>An enumerable of all entities in the database.</returns>
public virtual async Task<IEnumerable<TEntity>> ReadAllAsync() => await ReadAll().ToListAsync();
public virtual async Task<IEnumerable<TEntity>> ReadAllAsync() => await ReadOnly().ToListAsync();
/// <summary>
/// Asynchronously updates an existing entity in the repository.