Should i use Pooling=False in Entity Framework Connection String?

前端 未结 1 395
渐次进展
渐次进展 2021-01-07 05:18

We have an ASP.Net MVC3 application that is running on Azure, connecting to a Sql Azure Database via Entity Framework.

The Developer that produced this has Pooling=F

相关标签:
1条回答
  • 2021-01-07 05:59

    Yes, it is bad idea to have pooling=False. I don't use this option even for development. You should always use the SQL Server Connection Pooling.

    What you have to be aware of, however is the Transient Errors in SQL Azure. There are a couple of good reading that can be found on the Internet on how to handle Transient Errors in SQL using Entity Framework. Here is a (non-complete) list of some:

    • Best practices for handling Transient conditions in SQL Azure
    • SQL Azure and EF fault handling
    • EF CodeFirst and Transient Errors
    • Handling Transient Errors in SQL Azure

    Always use connection pooling, but be aware of the Transient conditions in SQL Azure.

    0 讨论(0)
提交回复
热议问题