How to set command timeout in aspnetcore/entityframeworkcore

后端 未结 3 1664
长情又很酷
长情又很酷 2021-02-06 21:28

The place where the command timeout is set is no longer the same as earlier versions.

However, I cannot find anywhere that says how to change this.

What I am doi

3条回答
  •  粉色の甜心
    2021-02-06 21:48

    you can change it through your context

    public class ApplicationDbContext : DbContext
    {
        public ApplicationDbContext()
        {
            Database.SetCommandTimeout(150000);
        }
    }
    

提交回复
热议问题