Skip to content

Commit

Permalink
fix: FacadeBase.SaveAsync uow is not dispossed
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Pluskal committed Apr 24, 2024
1 parent d02a04a commit 2462a7c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/CookBook/CookBook.BL/Facades/FacadeBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public virtual async Task<TDetailModel> SaveAsync(TDetailModel model)

TEntity entity = ModelMapper.MapToEntity(model);

IUnitOfWork uow = UnitOfWorkFactory.Create();
await using IUnitOfWork uow = UnitOfWorkFactory.Create();
IRepository<TEntity> repository = uow.GetRepository<TEntity, TEntityMapper>();

if (await repository.ExistsAsync(entity).ConfigureAwait(false))
Expand Down

0 comments on commit 2462a7c

Please sign in to comment.