I have a text file here:
In it I have the contents of a SQL script that I want to run. Previously, I had the file in a network path, however now I want to text file to live in the solution as it is in the picture above.
I have this method that used to call File.ReadAllText() on the network path of the SQL script which then stored the text as the script and then executed the SqlCommand:
The question that I have is how can I refer to TextFile1.txt in the File.ReadAllText() method so I can maintain the .txt files in my solution versus a network drive? Any help is appreciated.