Ejemplo n.º 1
0
        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;
            }));
        }
Ejemplo n.º 2
0
 internal async Task UpdateFeature(ProductFeatureEntity entity)
 {
     await UpdateAsync(entity);
 }
Ejemplo n.º 3
0
 internal async Task CreateProductFeature(ProductFeatureEntity entity)
 {
     await CreateAsync(entity);
 }