Search code examples
c#sqllinqsqlmetal

LINQ to SQL - Sql tuning


I am using LINQ to SQL for much of the data access layer and am trying to view and tune the underlying SQL used. Does anyone know a good mechanism to intercept the SQL used by C# LINQ and/or replace it with a more tuned query?


Solution

  • I highly recommend using LINQPad to analyze and optimize your LINQ. You can display generated SQL and check also how long certain query took.

    You can also use it with existing project that uses Entity Framework. See more details here.