@@ -42,7 +42,7 @@ public async Task AddAsync(User user, CancellationToken cancellationToken)
4242
4343public async Task < IList < User >> GetAllAsync (CancellationToken cancellationToken )
4444{
45- IList < User > users = await _userRepository .GetAll ().ToListAsync (cancellationToken ). ConfigureAwait ( false ) ;
45+ IList < User > users = await _userRepository .GetAll ().ToListAsync (cancellationToken );
4646 return users ;
4747}
4848```
@@ -63,8 +63,8 @@ public interface IRepository<TEntity>
6363{
6464 IQueryable <TEntity > GetAll ();
6565 IQueryable <TEntity > GetAllWithTacking ();
66- IQueryable <TEntity > GetWhere (Expression <Func <TEntity , bool >> expression );
67- IQueryable <TEntity > GetWhereWithTracking (Expression <Func <TEntity , bool >> expression );
66+ IQueryable <TEntity > Where (Expression <Func <TEntity , bool >> expression );
67+ IQueryable <TEntity > WhereWithTracking (Expression <Func <TEntity , bool >> expression );
6868 Task <TEntity > GetByExpressionAsync (Expression <Func <TEntity , bool >> expression , CancellationToken cancellationToken = default );
6969 Task <TEntity > GetByExpressionWithTrackingAsync (Expression <Func <TEntity , bool >> expression , CancellationToken cancellationToken = default );
7070 Task <TEntity > GetFirstAsync (CancellationToken cancellationToken = default );
@@ -107,12 +107,12 @@ public class Repository<TEntity, TContext> : IRepository<TEntity>
107107
108108 public async Task AddAsync (TEntity entity , CancellationToken cancellationToken = default )
109109 {
110- await Entity .AddAsync (entity , cancellationToken ). ConfigureAwait ( false ) ;
110+ await Entity .AddAsync (entity , cancellationToken );
111111 }
112112
113113 public async Task AddRangeAsync (ICollection <TEntity > entities , CancellationToken cancellationToken = default )
114114 {
115- await Entity .AddRangeAsync (entities , cancellationToken ). ConfigureAwait ( false ) ;
115+ await Entity .AddRangeAsync (entities , cancellationToken );
116116 }
117117
118118 public bool Any (Expression <Func <TEntity , bool >> expression )
@@ -132,13 +132,13 @@ public class Repository<TEntity, TContext> : IRepository<TEntity>
132132
133133 public async Task DeleteByExpressionAsync (Expression <Func <TEntity , bool >> expression , CancellationToken cancellationToken = default )
134134 {
135- TEntity entity = await Entity .Where (expression ).AsNoTracking ().FirstOrDefaultAsync (cancellationToken ). ConfigureAwait ( false ) ;
135+ TEntity entity = await Entity .Where (expression ).AsNoTracking ().FirstOrDefaultAsync (cancellationToken );
136136 Entity .Remove (entity );
137137 }
138138
139139 public async Task DeleteByIdAsync (string id )
140140 {
141- TEntity entity = await Entity .FindAsync (id ). ConfigureAwait ( false ) ;
141+ TEntity entity = await Entity .FindAsync (id );
142142 Entity .Remove (entity );
143143 }
144144
@@ -165,7 +165,7 @@ public class Repository<TEntity, TContext> : IRepository<TEntity>
165165
166166 public async Task <TEntity > GetByExpressionAsync (Expression <Func <TEntity , bool >> expression , CancellationToken cancellationToken = default )
167167 {
168- TEntity entity = await Entity .Where (expression ).AsNoTracking ().FirstOrDefaultAsync (cancellationToken ). ConfigureAwait ( false ) ;
168+ TEntity entity = await Entity .Where (expression ).AsNoTracking ().FirstOrDefaultAsync (cancellationToken );
169169 return entity ;
170170 }
171171
@@ -177,7 +177,7 @@ public class Repository<TEntity, TContext> : IRepository<TEntity>
177177
178178 public async Task <TEntity > GetByExpressionWithTrackingAsync (Expression <Func <TEntity , bool >> expression , CancellationToken cancellationToken = default )
179179 {
180- TEntity entity = await Entity .Where (expression ).FirstOrDefaultAsync (cancellationToken ). ConfigureAwait ( false ) ;
180+ TEntity entity = await Entity .Where (expression ).FirstOrDefaultAsync (cancellationToken );
181181 return entity ;
182182 }
183183
@@ -189,16 +189,16 @@ public class Repository<TEntity, TContext> : IRepository<TEntity>
189189
190190 public async Task <TEntity > GetFirstAsync (CancellationToken cancellationToken = default )
191191 {
192- TEntity entity = await Entity .AsNoTracking ().FirstOrDefaultAsync (cancellationToken ). ConfigureAwait ( false ) ;
192+ TEntity entity = await Entity .AsNoTracking ().FirstOrDefaultAsync (cancellationToken );
193193 return entity ;
194194 }
195195
196- public IQueryable <TEntity > GetWhere (Expression <Func <TEntity , bool >> expression )
196+ public IQueryable <TEntity > Where (Expression <Func <TEntity , bool >> expression )
197197 {
198198 return Entity .AsNoTracking ().Where (expression ).AsQueryable ();
199199 }
200200
201- public IQueryable <TEntity > GetWhereWithTracking (Expression <Func <TEntity , bool >> expression )
201+ public IQueryable <TEntity > WhereWithTracking (Expression <Func <TEntity , bool >> expression )
202202 {
203203 return Entity .Where (expression ).AsQueryable ();
204204 }
0 commit comments