Fixes in parameter names
This commit is contained in:
parent
eae1e1580e
commit
55475e0f97
@ -39,13 +39,13 @@ namespace Core.Inventory.Provider.Providers.Inventory
|
||||
/// <summary>
|
||||
/// Changes the status of a FurnitureVariant entity.
|
||||
/// </summary>
|
||||
/// <param name="_id">The furniture variant identifier.</param>
|
||||
/// <param name="mongoId">The furniture variant identifier.</param>
|
||||
/// <param name="newStatus">The new status to apply.</param>
|
||||
/// <param name="cancellationToken">Cancellation token.</param>
|
||||
/// <returns>The updated <see cref="FurnitureVariant"/>.</returns>
|
||||
public async ValueTask<FurnitureVariant> ChangeStatusAsync(string _id, StatusEnum newStatus, CancellationToken cancellationToken)
|
||||
public async ValueTask<FurnitureVariant> ChangeStatusAsync(string mongoId, StatusEnum newStatus, CancellationToken cancellationToken)
|
||||
{
|
||||
var entity = await repository.FindByIdAsync(_id);
|
||||
var entity = await repository.FindByIdAsync(mongoId);
|
||||
entity.Status = newStatus;
|
||||
await repository.ReplaceOneAsync(entity);
|
||||
return entity;
|
||||
@ -89,17 +89,17 @@ namespace Core.Inventory.Provider.Providers.Inventory
|
||||
/// <summary>
|
||||
/// Gets a FurnitureVariant entity by its ID.
|
||||
/// </summary>
|
||||
/// <param name="_id">The furniture variant identifier.</param>
|
||||
/// <param name="mongoId">The furniture variant identifier.</param>
|
||||
/// <param name="cancellationToken">Cancellation token.</param>
|
||||
/// <returns>The corresponding <see cref="FurnitureVariant"/>.</returns>
|
||||
public async ValueTask<FurnitureVariant> GetByIdAsync(string _id, CancellationToken cancellationToken)
|
||||
public async ValueTask<FurnitureVariant> GetByIdAsync(string mongoId, CancellationToken cancellationToken)
|
||||
{
|
||||
var cacheKey = CacheKeyHelper.GenerateCacheKey(this, nameof(GetByIdAsync), _id);
|
||||
var cacheKey = CacheKeyHelper.GenerateCacheKey(this, nameof(GetByIdAsync), mongoId);
|
||||
var cached = await cacheProvider.GetAsync<FurnitureVariant>(cacheKey);
|
||||
|
||||
if (cached is not null) return cached;
|
||||
|
||||
var result = await repository.FindByIdAsync(_id);
|
||||
var result = await repository.FindByIdAsync(mongoId);
|
||||
await cacheProvider.SetAsync(cacheKey, result);
|
||||
return result;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user