We want to use Linq to SQL for a project. That's the first time we use Linq. Typically we use just stored procedure calls.
So far everything is working great, but the DBA's are asking us whether we can mark the Linq generated SQL queries in a way that is visible in Profiler.
I googled and searched Stackoverflow and I found various ways to log the generated SQL. But that's not exactly what I want. I think ideal would be if I could stick a SQL comment into the generated SQL. Would that be visible in Profiler?
Thanks for any ideas!
You could use a unique connection string that includes a specific "Application Name" to identify LINQ to SQL queries.
Here is an example of how you can set the Application Name in code: