public bool Create(Product product, string VendorCode) { var vendCtrl = new VendorsController(connection); var vendor = vendCtrl.GetByCode(VendorCode); product.VendorId = vendor.Id; return(Create(product)); }
private void GetVendorForProduct(Product product) { var vendCtrl = new VendorsController(connection); product.vendor = vendCtrl.GetByPk(product.VendorId); }