开发者

How to tell LINQ providers about version/type of SQL Server before hand?

开发者 https://www.devze.com 2023-01-26 08:41 出处:网络
We are receiving timeout errors in an application with a high volume o开发者_StackOverflow社区f transactions to a SQL server database and have noticed that the timeouts mostly occur within the LINQ st

We are receiving timeout errors in an application with a high volume o开发者_StackOverflow社区f transactions to a SQL server database and have noticed that the timeouts mostly occur within the LINQ stuff where trying to call IsServer2KOrEarlier, IsSqlCe or IsServer2005. I wonder if I could tell LINQ providers about the exact type of the database so LINQ would not check for such things hoping it resolves some of the timeouts.

Cheers,

Reza


If you are using Linq to SQL you can use the Provider attribute:

[Provider(typeof(Sql2008Provider))]
public class MyDataContext : DataContext {
   ...
}
0

精彩评论

暂无评论...
验证码 换一张
取 消