我有这个查询,我找不到获取价格值的正确方法(.Amount.GetValueOrDefault())。
private IEnumerable<Product> GetSubsciptionOffers(IEnumerable<StripeProduct> productList)
{
return productList
.Select(async product => new Product
{
Name = product.Name,
Id = product.Id,
Image = new Uri(product.Images.First()),
Description = product.Description,
OfferType = OfferTypeEnum.Pro,
Price = await _planRepo.GetPlanByIdAsync(product.Metadata.First().Value).Amount.GetValueOrDefault()
});
}
错误是:
任务不包含金额的定义
一只甜甜圈
相关分类