Set Command Timeout in EF 6

前端 未结 1 472
野的像风
野的像风 2020-12-02 01:34

I want to set command timeout for query execution, currently I am doing context.Database.CommandTimeout = 90; but i feel this is not working, I tried checking t

相关标签:
1条回答
  • Check this :

    Entity Framework 6 :

    this.context.Database.CommandTimeout = 180;
    

    Entity Framework 5:

    ((IObjectContextAdapter)this.context).ObjectContext.CommandTimeout = 180;
    

    Entity Framework 4 and below:

    this.context.CommandTimeout = 180;
    
    0 讨论(0)
提交回复
热议问题