GoJS Blazor C# update diagram with new c# class data

Please could I get some help with this, or pointed to the correct samples.

I am evaluating GoJS for a project and really love it so far. I can get the core functionality working including adding an event listener within the diagram to respond to a click event of a button ‘outside’ the graph. I can get this listener to update the model with some sample data prepared in the diagram context.

What I cant seem to work out is how to ‘push’ a new node into the existing diagram from the ‘outside’ (C# code)

Would I use a listener or can I call a function in the diagram to pass the new item to?

I would like it to be additive. My use case is that in the C# side my user search for terms, a list response of items return in a table. Each item has an ‘add this item to the canvas’ option. This process allows them to have multiple items on the canvas for them to link, drill down etc.

I really appreciate any help.

Thanks
Darryl

The diagram code is running entirely in the browser. How are you communicating with the server? Somehow you need to send some data to the browser so that you can create model data in JavaScript and then add it to the model, within a transaction.