时不时的报错the connection is closed,有什么办法解决吗? 返回
fail: Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware[1]
An unhandled exception has occurred while executing the request.
System.AggregateException: One or more errors occurred. (Invalid operation. The connection is closed.)
---> System.InvalidOperationException: Invalid operation. The connection is closed.
at SqlSugar.AdoProvider.GetDataReaderAsync(String sql, SugarParameter[] parameters)
at SqlSugar.QueryableProvider`1.GetDataAsync[TResult](KeyValuePair`2 sqlObj)
at SqlSugar.QueryableProvider`1._ToListAsync[TResult]()
通过注入ISqlSugarClient使用,异步查询await _db.Queryable<TEntity>().WhereIF(whereExpression != null, whereExpression).ToListAsync();有时正常,有时就报the connection is closed,比较烦人,有没有办法解决呢?
热忱回答(2)
-
llhhll004 VIP0
2020/6/24没有
0 回复 -
遥望末班车 VIP0
2020/7/10@llhhll004:这个问题解决不了么,你之前回复的那个关闭自动释放改为手动也不行?话说手动怎么用
0 回复