首页 新闻 赞助 找找看

Cannot set MySqlCommand.CommandText when there is an open DataReader for this command; it must be closed first.

0
[已解决问题] 解决于 2019-07-24 09:11

System.InvalidOperationException
Cannot set MySqlCommand.CommandText when there is an open DataReader for this command; it must be closed first.

System.InvalidOperationException: Cannot set MySqlCommand.CommandText when there is an open DataReader for this command; it must be closed first.
at MySql.Data.MySqlClient.MySqlCommand.set_CommandText(String value) in C:\projects\mysqlconnector\src\MySqlConnector\MySql.Data.MySqlClient\MySqlCommand.cs:line 201
at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.CreateCommand(IRelationalConnection connection, IReadOnlyDictionary2 parameterValues) at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.ExecuteAsync(IRelationalConnection connection, DbCommandMethod executeMethod, IReadOnlyDictionary2 parameterValues, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Query.AsyncQueryMethodProvider.FastQueryAsyncEnumerable1.FastQueryAsyncEnumerator.MoveNext(CancellationToken cancellationToken) at System.Linq.AsyncEnumerable.Aggregate_[TSource,TAccumulate,TResult](IAsyncEnumerable1 source, TAccumulate seed, Func3 accumulator, Func2 resultSelector, CancellationToken cancellationToken) in D:\a\1\s\Ix.NET\Source\System.Interactive.Async\Aggregate.cs:line 120
at dotNET.Application.App.AreaListApp.TestAsync() in C:\Users\conanl\source\repos\conan.net\src\Application\Sys\AreaListApp.cs:line 20
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

程序员编程日记的主页 程序员编程日记 | 初学一级 | 园豆:6
提问于:2019-07-08 11:44
< >
分享
最佳答案
0

ioc 注入问题

程序员编程日记 | 初学一级 |园豆:6 | 2019-07-24 09:11

能给点提示吗?

灬丶 | 园豆:6 (初学一级) | 2019-09-18 10:13
其他回答(4)
0

多少贴点代码出来噻,比如从DataReader 取出数据的那段代码

~冰 | 园豆:509 (小虾三级) | 2019-07-08 14:36
0

你解决了吗?我看你说是ioc注入问题?

灬丶 | 园豆:6 (初学一级) | 2019-09-18 10:13
0

楼主解决了吗 我也出现这个问题了

彭大神 | 园豆:202 (菜鸟二级) | 2020-03-01 10:16
0

怎么解决的,我也出现这个问题了

...流|憩、。 | 园豆:202 (菜鸟二级) | 2020-11-02 09:31
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册