C# 使用InsightDb更新到.Net core 3.1后sql事务不工作
我需要使用insightDb在事务中执行一些存储过程,我做了以下工作,它在.NETCore2.2中运行良好C# 使用InsightDb更新到.Net core 3.1后sql事务不工作,c#,sql,.net-core,.net-core-3.1,C#,Sql,.net Core,.net Core 3.1,我需要使用insightDb在事务中执行一些存储过程,我做了以下工作,它在.NETCore2.2中运行良好 using (var ts = TransactionScopeBuilder.CreateReadCommitted()) { await _profile.createProfile(user); await _profile.addAdditionalData(user);
using (var ts = TransactionScopeBuilder.CreateReadCommitted())
{
await _profile.createProfile(user);
await _profile.addAdditionalData(user);
ts.Complete();
}
更新到.net core 3.1后。我在createProfile(用户)上遇到此异常。我使用的是insightDb,createProfile是被调用的存储过程的名称。它在.NETCore2.2上运行良好。以下是异常的所有详细信息
InsightDb版本为6.3.1
例外情况:
在调用createProfile时,我遇到以下异常:
序列化StackTraceString:
Microsoft.ApplicationInsights.DependencyCollector.Implementation.SqlClientDiagnostics.SqlClientDiagnosticSourceListener.ConfigureExceptionTeletry(DependencyTelemetry遥测、异常、PropertyFetcher numberFetcher)
来源:
Microsoft.AI.DependencyCollector
StackTrace
Microsoft.ApplicationInsights.DependencyCollector.Implementation.SqlClientDiagnostics.SqlClientDiagnosticSourceListener.ConfigureExceptionTeletry(DependencyTelemetry遥测、异常异常、PropertyFetcher numberFetcher
\u消息“对象引用未设置为对象的实例。”您是否找到了解决方案?不幸的是,没有:(我们必须删除事务并添加try-catch。