Example #1
0
        public virtual async Task <ProductAssetDto> UpdatePeriodAsync(Guid productAssetId, Guid periodId,
                                                                      UpdateProductAssetPeriodDto input)
        {
            var productAsset = await GetEntityByIdAsync(productAssetId);

            await CheckMultiStorePolicyAsync(productAsset.StoreId, UpdatePolicyName);

            var productAssetPeriod = productAsset.GetPeriod(periodId);

            ObjectMapper.Map(input, productAssetPeriod);

            await _repository.UpdateAsync(productAsset, true);

            return(await MapToGetOutputDtoAsync(productAsset));
        }
Example #2
0
 public virtual Task <ProductAssetDto> UpdatePeriodAsync(Guid productAssetId, Guid periodId, UpdateProductAssetPeriodDto input)
 {
     return(_service.UpdatePeriodAsync(productAssetId, periodId, input));
 }