11# Dependency
22
3- This library was created by .Net 8 .0
3+ This library was created by .Net 9 .0
44
55## Install
66``` bash
@@ -69,9 +69,12 @@ public interface IRepository<TEntity>
6969{
7070 IQueryable <TEntity > GetAll ();
7171 IQueryable <TEntity > GetAllWithTracking ();
72- IQueryable <TEntity > Where (Expression <Func <TEntity , bool >> expression );
72+ IQueryable <TEntity > Where (Expression <Func <TEntity , bool >> expression );
7373 IQueryable <TEntity > WhereWithTracking (Expression <Func <TEntity , bool >> expression );
74+ TEntity First (Expression <Func <TEntity , bool >> expression , bool isTrackingActive = true );
75+ TEntity FirstOrDefault (Expression <Func <TEntity , bool >> expression , bool isTrackingActive = true );
7476 Task <TEntity > FirstOrDefaultAsync (Expression <Func <TEntity , bool >> expression , CancellationToken cancellationToken = default , bool isTrackingActive = true );
77+ Task <TEntity > FirstAsync (Expression <Func <TEntity , bool >> expression , CancellationToken cancellationToken = default , bool isTrackingActive = true );
7578 Task <TEntity > GetByExpressionAsync (Expression <Func <TEntity , bool >> expression , CancellationToken cancellationToken = default );
7679 Task <TEntity > GetByExpressionWithTrackingAsync (Expression <Func <TEntity , bool >> expression , CancellationToken cancellationToken = default );
7780 Task <TEntity > GetFirstAsync (CancellationToken cancellationToken = default );
@@ -83,12 +86,13 @@ public interface IRepository<TEntity>
8386 Task AddAsync (TEntity entity , CancellationToken cancellationToken = default );
8487 void Add (TEntity entity );
8588 Task AddRangeAsync (ICollection <TEntity > entities , CancellationToken cancellationToken = default );
89+ void AddRange (ICollection <TEntity > entities );
8690 void Update (TEntity entity );
8791 void UpdateRange (ICollection <TEntity > entities );
8892 Task DeleteByIdAsync (string id );
89- Task DeleteByExpressionAsync (Expression <Func <TEntity , bool >> expression , CancellationToken cancellationToken = default );
93+ Task DeleteByExpressionAsync (Expression <Func <TEntity , bool >> expression , CancellationToken cancellationToken = default );
9094 void Delete (TEntity entity );
9195 void DeleteRange (ICollection <TEntity > entities );
92-
96+ IQueryable < KeyValuePair < bool , int >> CountBy ( Expression < Func < TEntity , bool >> expression , CancellationToken cancellationToken = default );
9397}
9498```
0 commit comments