At my job, my team and I work on an .NET MVC project in Visual Studio where we often have to call controller or model functions from within JavaScript files. For example:
$.ajax({
"dataType": 'json',
"type": "POST",
"url": "/Lookup/CreateLeadForEmployee"
This is used to call the CreateLeadForEmployee
method from within the lookup controller. The problem is that whenever we want to rename these kinds of functions or find references to them, we have to use a much more manual search process instead of Visual Studio's built in capabilities (or those of different extensions and tools). This often leads to errors and issues, as it's easy to miss certain references.
What I'm wondering is if there is some kind of tool, package, add-on, or code syntax that would allow me and my team to tell Visual Studio to recognize things like the example I provided as invocations of specific C# functions? To put it another way, how do I make it so that when I right-click on CreateLeadForEmployee
in Visual Studio and select "Find all references", it will include any references to the function made from a JavaScript file?