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; })); }
internal async Task UpdateFeature(ProductFeatureEntity entity) { await UpdateAsync(entity); }
internal async Task CreateProductFeature(ProductFeatureEntity entity) { await CreateAsync(entity); }