fix: use GetByIdAsync in DeleteAsync(TEntityId)

Replaced sync GetById with await GetByIdAsync to avoid blocking the thread inside an async method.

Ref: #IT-631
This commit is contained in:
Anatolii Grynchuk
2026-05-06 12:46:35 +03:00
parent 1edcafdebd
commit 9c1da388d8
+1 -1
View File
@@ -89,7 +89,7 @@ public abstract class BaseEfRepository<TDbContext, TEntity, TEntityId> :
public async Task DeleteAsync(TEntityId id) public async Task DeleteAsync(TEntityId id)
{ {
TEntity? entity = GetById(id); TEntity? entity = await GetByIdAsync(id);
if (entity != null) if (entity != null)
{ {
DoRemove(entity); DoRemove(entity);