remove ReadQuery
This commit is contained in:
@@ -17,18 +17,4 @@ public static class Extensions
|
||||
return repository.CreateAsync(entities, ct);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Read
|
||||
public static async Task<TEntity?> ReadFirstOrDefaultAsync<TEntity>(this IRepository<TEntity> repository, Expression<Func<TEntity, bool>>? expression = null)
|
||||
=> (await repository.ReadAllAsync(expression)).FirstOrDefault();
|
||||
|
||||
public static async Task<TEntity> ReadFirstAsync<TEntity>(this IRepository<TEntity> repository, Expression<Func<TEntity, bool>>? expression = null)
|
||||
=> (await repository.ReadAllAsync(expression)).First();
|
||||
|
||||
public static async Task<TEntity?> ReadSingleOrDefaultAsync<TEntity>(this IRepository<TEntity> repository, Expression<Func<TEntity, bool>>? expression = null)
|
||||
=> (await repository.ReadAllAsync(expression)).SingleOrDefault();
|
||||
|
||||
public static async Task<TEntity> ReadSingleAsync<TEntity>(this IRepository<TEntity> repository, Expression<Func<TEntity, bool>>? expression = null)
|
||||
=> (await repository.ReadAllAsync(expression)).Single();
|
||||
#endregion
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user