Ejemplo n.º 1
0
        public async Task <Guid> CreateVersion(Guid productId, string version)
        {
            return(await unitOfWork.RunInTransactionAsync(async() =>
            {
                var product = await licenseRepository.GetProduct(productId);

                var entity = new ProductVersionEntity
                {
                    Active = true,
                    Product = product,
                    Name = version,
                };

                await licenseRepository.CreateVersion(entity);

                product.Versions.Add(entity);

                await licenseRepository.UpdateProduct(product);

                return entity.Id;
            }));
        }
Ejemplo n.º 2
0
 internal async Task CreateVersion(ProductVersionEntity entity)
 {
     await CreateAsync(entity);
 }