Often times I write some SQL like this:
string sql = @"
-- Multi-line SQL
";
Without getting into a debate on whether this approach is good or bad, can someone tell me what is the best way to get this SQL to be highlighted inside Visual Studio?
One approach I can think of is to create separate .sql
files and then consume that as a string here so that when editing the original SQL, Visual Studio recognizes that this is a SQL file and syntax-highlights it.
This seems to be a tedious approach to solve a simple problem. Is there a simpler solution?