BOI. Please, provide an example of a sample C# or VB code as a reference to write invoice using BOI which links to an Order

Hi Team,

Please, help me with this scenario.

Scenario: 

  1. Order is already created in the ERP
  2. Using BOI, write an Invoice to ERP that Integrates into an Order (The invoice will contain the Order document number(DO_Piece)).

    a) This invoice can also have some extra lines (other than the lines on the Order which it is linked) 

Could you provide an example of a sample C# or VB code as a reference to write this invoice using BOI which links to an Order?