C# EntityFramework DBContext Timeout
逾時值 (以秒為單位)
- public class MyContext : DbContext
- {
- public MyContext () : base(ContextHelper.CreateConnection("my connection string"), true)
- {
- ((IObjectContextAdapter)this).ObjectContext.CommandTimeout = 300;
- }
- }
逾時值 (以秒為單位)
- public class MyContext : DbContext
- {
- public MyContext () : base(ContextHelper.CreateConnection("my connection string"), true)
- {
- ((IObjectContextAdapter)this).ObjectContext.CommandTimeout = 300;
- }
- }
留言
張貼留言