When we query a package and its product is null but not products property then get packages throws exception.
Following code can be used to fix the issue
if (dcathandler.ProductListing.Product == null)
dcathandler.ProductListing.Product = dcathandler.ProductListing.Products[0];
var g = await dcathandler.GetPackagesForProductAsync();
When we query a package and its product is null but not products property then get packages throws exception. Following code can be used to fix the issue
if (dcathandler.ProductListing.Product == null) dcathandler.ProductListing.Product = dcathandler.ProductListing.Products[0]; var g = await dcathandler.GetPackagesForProductAsync();