Ok, so I get that Edge-SQL let's you write T-SQL statements directly in your node.js code.
Awesome.
But I have legacy DLL's that access a DB on their own which I need to integrate into a node.js app. Basically, I have a set of DLL's responsible for building data objects from a DB I would like to expose via .NET async methods, which currently pass the data objects back to an ASP.NET front-end. The goal is to be able to replace the ASP.NET front-end with a node.js front-end utilizing the same data DLL's from the legacy app.
My questions are:
- Is it possible to use those DLL's in a node.js context using edge.js? and if so,
- Is the only issue with doing so properly passing in a connection string? and
- How would I pass in the DB Connection which is normally within the web.config for those DLL's to take advantage of?
EDIT
Similar to this question: Using a .NET DLL in Node.js / serverside javascript except no details on how to handle the connection strings and this question Connect to SQL Server database from Node.js.
Obviously the two can work in conjunction, but curious as to how to make it work with DB calls coming from compiled DLLs but the web app the DLLs are used in is an express.js/node.js app.
EDIT 2
To clarify, the goal is to have a .cs/.csx file(s) that I can call methods from, passing in parameters (from URL) from node to pass to the methods in the .cs/.csx files that in turn call into the pre-compiled DLL's included in the project. It is those DLL's that have the calls to the DB which are in need of a connection string being passed in.