Esempio n. 1
0
        public virtual async Task <ProductAssetDto> CreatePeriodAsync(Guid productAssetId,
                                                                      CreateProductAssetPeriodDto input)
        {
            var productAsset = await GetEntityByIdAsync(productAssetId);

            await CheckMultiStorePolicyAsync(productAsset.StoreId, UpdatePolicyName);

            productAsset.AddPeriod(
                ObjectMapper.Map <CreateProductAssetPeriodDto, ProductAssetPeriod>(input));

            await _repository.UpdateAsync(productAsset, true);

            return(await MapToGetOutputDtoAsync(productAsset));
        }
Esempio n. 2
0
 public virtual Task <ProductAssetDto> CreatePeriodAsync(Guid productAssetId, CreateProductAssetPeriodDto input)
 {
     return(_service.CreatePeriodAsync(productAssetId, input));
 }