using (DataClasses1DataContext context = new DataClasses1DataContext())
{
Console.WriteLine(context.GetTable<Card>().Count());
}
日志会是:
SELECT COUNT(*) AS [value]
FROM [dbo].[Card] AS [t0]
SELECT COUNT(*) AS [value]
FROM [dbo].[Card] AS [t0]
为什么sql server profiler会生成两条sql?