且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

与实体框架异步方法和SQL Server Compact阻塞行为

更新时间:2023-01-29 13:36:50

SQL Server精简ADO.NET提供者不提供任何异步的API。但是加载数据不应该采取fewcseconds,除非你是获取行的1000。初始化dbContext.connection对象当您启动应用程序,并留下空,不使用你的应用程序的生命周期。还存在的的DbContext首次初始化的成本。

The SQL Server Compact ADO.NET provider does not provide any Async APIs. But loading data should never take a fewcseconds, unless you are fetching 1000s of rows. Initialize a dbContext.connection object when you start your app, and leave empty and unused for the lifetime of your app. There is also a cost of init of dbContext first time.