Command Timeout with Entity Framework 4.1 Code First

后端 未结 5 1243
攒了一身酷
攒了一身酷 2021-01-01 10:06

How can I set the command timeout of a DbContext?

5条回答
  •  猫巷女王i
    2021-01-01 10:12

    If you're using SqlServer, just add this to your connection string: "... Connect Timeout = x" Where x is the timeout in ms.

提交回复
热议问题