2、使用的时候每次都重新获取using var db = CommonServiceLocator.ServiceLocator.Current.GetInstance<ISqlSugarClient>(), 3、在执行批量操作的时候db.Storageable(list).DefaultAddElseUpdate().PageSize(100).ExecuteCommand(); 报了下面的错误 A command is already in progress: select kcu.column_name as...
1、SqlSugarClient换成SqlSugarScope (SqlSugarScope 要用单例不然内存会增加) 2、多租户: db.GetConnection 换成 db.GetConnectionScope(Aop也要统一不然事件注册不了) 3、IsAutoCloseConnection=true 需要设置true 4、异步方法wait存在漏写, 一个不能少 。解决方案:找到漏掉的await 不想找 就用db.CopyNew()。 5...
Command timeout has been refactored to use network and stream timeouts instead of a timer. The result of this is that fewer system resources are used and the system should be more reliable. - Completely refactored MySqlConnectionStringBuilder - Completely refactored logging system. It now users ...
1: db.GetConnection 换成 db.GetConnectionScope(Aop也要统一不然事件注册不了) 2、IsAutoCloseConnection=true 需要设置true 3、异步方法wait存在漏写, 一个不能少 。解决方案:找到漏掉的await不想找就用db.CopyNew()。 4、使用await 返回值必须有Task,不能是Void 这种(表达式中异步只能是Func<Task>不能是Acti...
因为很多方法都是异步的, 可能同时有多个读写操作都在执行。 这个问题或许用 ExecuteCommandAsync 可以解决,我还没试因为是偶发性的, 但是除此之外还有别的办法吗? 有时候就是需要用ExecuteCommandHasChange等其他不是异步的方法收藏 热忱回答(1)fate sta VIP0 2024/5/17 https://www.donet5.com/Home/Doc?
正常添加数据出现错误:Npgsql.NpgsqlOperationInProgressException (0x80004005): A command is already in progress 特殊点:方法加AOP进行数据库数据保存。 VS版本 2019 NET版本:.net5 SqlSugar版本:SqlSugarCore 5.1.1 数据库连接自动释放: 热忱回答(3)
报这个错具体是什么原因 A command is already in progress收藏 热忱回答(1)fate sta VIP0 2024/6/4 线程安全问题 ,照着改就行了 https://www.donet5.com/Home/Doc?typeId=1224 0 回复 字号 代码语言 段落格式 字体 元素路径: 字数统计提交回答 ...
where relkind in('p', 'r') and relname not like 'pg_%' and relname not like 'sql_%' and schemaname='public' order by relname,err:A command is already in progress: select cast(relname as varchar) as Name, cast(obj_description(c.oid,'pg_class') as varchar) as Description from ...