Skip to content

Commit ca1945c

Browse files
committed
(#271) Semantic/Vector Search
1 parent 9df3fa1 commit ca1945c

File tree

31 files changed

+273
-62
lines changed

31 files changed

+273
-62
lines changed

src/Monolith/ClassifiedAds.Application/Common/Commands/AddEntityCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@ public AddEntityCommandHandler(ICrudService<TEntity> crudService)
2828

2929
public async Task HandleAsync(AddEntityCommand<TEntity> command, CancellationToken cancellationToken = default)
3030
{
31-
await _crudService.AddAsync(command.Entity);
31+
await _crudService.AddAsync(command.Entity, cancellationToken);
3232
}
3333
}

src/Monolith/ClassifiedAds.Application/Common/Commands/AddOrUpdateEntityCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@ public AddOrUpdateEntityCommandHandler(ICrudService<TEntity> crudService)
2828

2929
public async Task HandleAsync(AddOrUpdateEntityCommand<TEntity> command, CancellationToken cancellationToken = default)
3030
{
31-
await _crudService.AddOrUpdateAsync(command.Entity);
31+
await _crudService.AddOrUpdateAsync(command.Entity, cancellationToken);
3232
}
3333
}

src/Monolith/ClassifiedAds.Application/Common/Commands/DeleteEntityCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@ public DeleteEntityCommandHandler(ICrudService<TEntity> crudService)
2323

2424
public async Task HandleAsync(DeleteEntityCommand<TEntity> command, CancellationToken cancellationToken = default)
2525
{
26-
await _crudService.DeleteAsync(command.Entity);
26+
await _crudService.DeleteAsync(command.Entity, cancellationToken);
2727
}
2828
}

src/Monolith/ClassifiedAds.Application/Common/Commands/UpdateEntityCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@ public UpdateEntityCommandHandler(ICrudService<TEntity> crudService)
2828

2929
public async Task HandleAsync(UpdateEntityCommand<TEntity> command, CancellationToken cancellationToken = default)
3030
{
31-
await _crudService.UpdateAsync(command.Entity);
31+
await _crudService.UpdateAsync(command.Entity, cancellationToken);
3232
}
3333
}

src/Monolith/ClassifiedAds.Application/Products/Commands/AddUpdateProductCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public async Task HandleAsync(AddUpdateProductCommand command, CancellationToken
2525
{
2626
using (await _unitOfWork.BeginTransactionAsync(System.Data.IsolationLevel.ReadCommitted, cancellationToken))
2727
{
28-
await _productService.AddOrUpdateAsync(command.Product);
28+
await _productService.AddOrUpdateAsync(command.Product, cancellationToken);
2929

3030
await _unitOfWork.CommitTransactionAsync(cancellationToken);
3131
}

src/Monolith/ClassifiedAds.Application/Products/Commands/DeleteProductCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ public DeleteProductCommandHandler(ICrudService<Product> productService)
2020

2121
public async Task HandleAsync(DeleteProductCommand command, CancellationToken cancellationToken = default)
2222
{
23-
await _productService.DeleteAsync(command.Product);
23+
await _productService.DeleteAsync(command.Product, cancellationToken);
2424
}
2525
}

src/Monolith/ClassifiedAds.Application/Roles/Commands/AddClaimCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@ public AddClaimCommandHandler(IRoleRepository roleRepository)
2323
public async Task HandleAsync(AddClaimCommand command, CancellationToken cancellationToken = default)
2424
{
2525
command.Role.Claims.Add(command.Claim);
26-
await _roleRepository.UnitOfWork.SaveChangesAsync();
26+
await _roleRepository.UnitOfWork.SaveChangesAsync(cancellationToken);
2727
}
2828
}

src/Monolith/ClassifiedAds.Application/Roles/Commands/AddUpdateRoleCommand .cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public AddUpdateRoleCommandHandler(IRoleRepository roleRepository)
2121

2222
public async Task HandleAsync(AddUpdateRoleCommand command, CancellationToken cancellationToken = default)
2323
{
24-
await _roleRepository.AddOrUpdateAsync(command.Role);
25-
await _roleRepository.UnitOfWork.SaveChangesAsync();
24+
await _roleRepository.AddOrUpdateAsync(command.Role, cancellationToken);
25+
await _roleRepository.UnitOfWork.SaveChangesAsync(cancellationToken);
2626
}
2727
}

src/Monolith/ClassifiedAds.Application/Roles/Commands/DeleteClaimCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@ public DeleteClaimCommandHandler(IRoleRepository roleRepository)
2323
public async Task HandleAsync(DeleteClaimCommand command, CancellationToken cancellationToken = default)
2424
{
2525
command.Role.Claims.Remove(command.Claim);
26-
await _roleRepository.UnitOfWork.SaveChangesAsync();
26+
await _roleRepository.UnitOfWork.SaveChangesAsync(cancellationToken);
2727
}
2828
}

src/Monolith/ClassifiedAds.Application/Roles/Commands/DeleteRoleCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@ public DeleteRoleCommandHandler(IRoleRepository roleRepository)
2222
public async Task HandleAsync(DeleteRoleCommand command, CancellationToken cancellationToken = default)
2323
{
2424
_roleRepository.Delete(command.Role);
25-
await _roleRepository.UnitOfWork.SaveChangesAsync();
25+
await _roleRepository.UnitOfWork.SaveChangesAsync(cancellationToken);
2626
}
2727
}

0 commit comments

Comments
 (0)