更新时间:2023-09-22 16:52:04
刚刚找到了答案与智能感知玩:
Just found the answer playing with intellisense:
using (MainContext db = new MainContext())
{
db.CommandTimeout = 3 * 60; // 3 Mins
}
这是你如何可以增加时间出去查询作为应该修改连接字符串或数据上下文的每个查询的基础。
This is how you can increase the time out for a query on a per query basis as supposed to modifying the connection strings or data contexts.