I need to call a MongoDB Stored JavaScript Function in C# Code.
My Stored JavaScript Function GetUserInfo
function() {
return db
You can use the RunCommand method to execute the eval command. We've removed it from the API itself because we don't want you using it. Have a look at these sections for why you shouldn't be using eval, first and second.
I'd highly suggest you rethink your "stored procedure" strategy. While I applaud your efforts to centralize and DRY your code, eval in MongoDB will kill performance and concurrency.