There reasons to do each of these things, but as a general rule your sense of Code Smell should light up if you smell Stringly Typed things. Inline SQL is another where one language a proper language with Syntax is tunneled as a string within another. There no good solution for this as most languages dont have a way to express SQL such that a compiler could noticed a problem. Sometimes well see Fluent APIs like LINQ try to solve this. RegEx is another example of a string language within a...

Read the full article at ASP.NET Team