我有两张表,比如
VendorProduct vp = new VendorProduct
{
VendorPartNo = txtVdrPartNoOrg10.Value
};
和
Product p = new Product
{
MfgPartNo = lbMfgPartNoOrg10.Text,
Description = txtDesOrg10.Text,
Weight = Convert.ToDecimal(txtWeightOrg10.Value),
VendorProducts = new System.Collections.ObjectModel.Collection<VendorProduct>() { vp }
};
如何将 Insert
数据添加到这些表中
DataContext.AddObject("Product", p);
DataContext.SaveChanges();
如何设置链接??