Invoking Node services from ASP.NET Core

I'm trying to use Node services in our ASP.NET Core code using the interface INodeServices and call its InvokeAsync method to activate some JavaScript library that activates a player that needs to be embedded into a modal dialog and the values are dynamically loaded from database.

This is a 3rd party library is from Furioos that is written in NodeJS and expects the value and id of html container where it loads the app.

As this module is not returning any data, I'm not sure how to use the nodeServices.InvokeAsync<T>

  1. What should be its return type ?

  2. How do I bind this call on a button click that loads the player in a modal window ?

Here is what I've done so far :

enter image description here

And the code snippet from sdk I'm using is as below :

enter image description here



Read more here: https://stackoverflow.com/questions/67393417/invoking-node-services-from-asp-net-core

Content Attribution

This content was originally published by Krish at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: