public async Task <Guid> CreateProductFeature(Guid productId, string featureKey)
        {
            return(await unitOfWork.RunInTransactionAsync(async() =>
            {
                var product = await licenseRepository.GetProduct(productId);

                var entity = new ProductFeatureEntity
                {
                    Active = true,
                    Key = featureKey,
                    Product = product
                };

                await licenseRepository.CreateProductFeature(entity);

                product.Features.Add(entity);

                await licenseRepository.UpdateProduct(product);

                return entity.Id;
            }));
        }
Beispiel #2
0
 internal async Task UpdateFeature(ProductFeatureEntity entity)
 {
     await UpdateAsync(entity);
 }
Beispiel #3
0
 internal async Task CreateProductFeature(ProductFeatureEntity entity)
 {
     await CreateAsync(entity);
 }