private void AssociateProduct(int relatedProductId) { Product product = ProductDataSource.Load(relatedProductId); if (product != null) { if (!IsProductAssciated(product)) { ProductDigitalGood pgd = new ProductDigitalGood(); pgd.ProductId = product.Id; pgd.DigitalGoodId = _DigitalGoodId; pgd.Save(); _DigitalGood.ProductDigitalGoods.Add(pgd); product.DigitalGoods.Add(pgd); } } }
public static SaveResult Insert(ProductDigitalGood productDigitalGood) { return(productDigitalGood.Save()); }
public static SaveResult Update(ProductDigitalGood productDigitalGood) { return(productDigitalGood.Save()); }