The first part is to create the contract, which is the data that is sent to an endpoint by the business event. This is done as follows:
- This event has a nested data contract, so we will create the bill of material lines contract first. Create a class named ConPIBOMLineContract that must be decorated as a DataContract. The completed class should be as follows:
[DataContract]class ConPIBOMLineContract{ ItemId itemId; Qty qty; BOMUnitId bomUnitId; [DataMember('ItemId'), BusinessEventsDataMember('Material Id')] public ItemId ParmItemId(ItemId _itemId = itemId) { itemId = _itemId; return itemId; } [DataMember('Qty'), BusinessEventsDataMember('Quantity')] public Qty ParmQty(Qty _qty = qty) { qty = _qty; return qty; } [DataMember('BOMUnitId'), ...