public async Task <bool> UpdateProductAsync(Product product) { var productCosmos = new CosmosProduct { ProductID = product.ProductID.ToString(), ProductName = product.ProductName, ProductCode = product.ProductCode }; var response = await _cosmosStore.UpdateAsync(productCosmos); return(response.IsSuccess); }
public async Task <bool> CreateProductAsync(Product product) { var productCosmos = new CosmosProduct { ProductID = Guid.NewGuid().ToString(), ProductName = product.ProductName, ProductCode = product.ProductCode }; var response = await _cosmosStore.AddAsync(productCosmos); product.ProductID = Guid.Parse(productCosmos.ProductID); return(response.IsSuccess); }