1. 程式人生 > >The transaction associated with this command is not the connection's active transaction

The transaction associated with this command is not the connection's active transaction

The fix is fairly simple: if you want a Dapper query to participate in a connection, explicitly denote that intent:

private async Task<EResult> ProcessDepotAfterDownload(ManifestJob request, DepotManifest depotManifest)
{
    using (var db = await Database.GetConnectionAsync())
    using (var
transaction = await db.BeginTransactionAsync()) { // add `transaction` to method call below var result = await ProcessDepotAfterDownload(db, transaction, request, depotManifest); await transaction.CommitAsync(); return result; } } private async Task<EResult> ProcessDepotAfterDownload(IDbConnection db, IDbTransaction transaction, ManifestJob request, DepotManifest depotManifest) {
// pass `transaction` to Dapper's QueryAsync below var filesOld = (await db.QueryAsync<DepotFile>("SELECT `ID`, `File`, `Hash`, `Size`, `Flags` FROM `DepotsFiles` WHERE `DepotID` = @DepotID", new { request.DepotID }, transaction: transaction)).ToDictionary(x => x.File, x => x); .... }

相關推薦

The transaction associated with this command is not the connection's active transaction

The fix is fairly simple: if you want a Dapper query to participate in a connection, explicitly denote that intent: private async Task<EResult> Pro

C#.net mysql There is already an open datareader associated with this command引發的問題

關閉 close csdn != 定義 spa apt 因此 關鍵字 【參考】There is already an open datareader associated with this command引發的問題 我在語句中並未使用 DataReader,未何也提示

【VS Code】"The 'clang-format' command is not available. Please check your clang-format."報錯

文章目錄 "The 'clang-format' command is not available......"報錯 說明 一、安裝外掛‘clang-format’ 二、解決方案 三、參考連結

解決Redhat yum出現This system is not registered with RHN的方案

article repos 大學 nbsp get linu 中國 roo 國外 最近博主在學習Linux,菜鳥級別的的選手連裝個Chrome都覺得難,悲了個催的……百度了很多教程,大多是類似的。博主的配置是在VM8下搭建的RHEL5.3 (Tikanga)版本,不知道什麽

解決“This implementation is not part of the Windows Platform FIPS validated cryptographic algorithms”

policy font edi config 分享 his 內容 class crypto 解決“This implementation is not part of the Windows Platform FIPS validated cryptographic alg

Red Hat Enterprise 7.5 安裝後無法進入圖形界面 This system is not registered with an entitlement server. You can use subscription-manager to register.

rpm 2.0 轉載 scrip HA 匿名 rgs version 圖形界面 This system is not registered with an entitlement server. You can use subscription-manager to reg

redhat替換yum源時redhat.repo無法刪除或禁用的問題提示:This system is not registered with an entitlement server.

redhat替換yum源時redhat.repo無法刪除或禁用的問題提示:This system is not registered with an entitlement server.You can use subscription-manager to register. 今天

解決The resource identified by this request is only capable of generating responses with charac.......

在除錯springmvc的時候,將一個物件返回為json串的時候,瀏覽器報406錯誤,錯誤內容如下: The resource identified by this request is only capable of generating responses

this class is not key value coding-compliant for the key '***'的解決方案

專案中經常會遇到this class is not key value coding-compliant for the key '***.'這樣的崩潰,原因經過分析可能是由以下幾點造成的: 1,在載入介面的時候,總是報這個錯誤: 解決方法: 因為在xib的連線

yum 失敗(This system is not registered with RHN.)解決方法(14.11最新)

使用RedHat 系統線上安裝時提示This system is not registered with RHN.如下: [[email protected] ~]# yum install httpd Loaded plugins: rhnplugin, s

推薦TED演講:20歲光陰不再來(Why 30 is not the new 20)

網易公開課 -1 兩個 dsm 未能 -a track mod popu 緣起 早上起來在電腦上看到“自強不息”群(群號)中駱宏給大家分享的視頻。“20歲光陰不再來”,利用短暫的時間瀏覽了一下。就像把這個TED視頻分享給很多其它的朋友。 一:網友

微信小程序 this.setData is not a function

ava ucc post scrip hang pic javascrip form 定時   在一般的函數中: 1 bindFaChange1: function (e) { 2 console.log(‘picker發送選擇改變,攜帶值為‘, e.detail

This system is not registered to Red Hat

yum安裝提示需要註冊yum安裝提示需要註冊 提示報錯如下:Loaded plugins: aliases, changelog, downloadonly, kabi, presto, product-id, refresh-packagekit, security, subscription-manage

DPI-1047: 64-bit Oracle Client library cannot be loaded: "D:appxygproduct11.2.0client_1inoci.dll is not the correct architecture"

ade 連接 ora 64位 color 完成後 添加 tools family 原因: instantclient版本為32位,需更換成64位。 解決方案: 1. 重新下載 instantclient 64位, 下載鏈接:http://jvniu.jb51

This view is not constrained. It only has designtime positions, so it will jump to (0,0) at runtime

使用 ConstraintLayout 遇到的問題 This view is not constrained. It only has designtime positions, so it will jump to (0,0) at runtime ConstraintLayout

rac環境打PSU補丁ERROR:This patch is not applicable to GI home.

問題描述: 當我給grid軟體打補丁時,執行到【./opatch auto /tmp/psu/28429134 -oh /u01/app/11.2.0/grid/ -ocmrf /tmp/ocm.rsp】 這一步時,報錯ERROR:This patch is not applicable to

c++ Socket學習——The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name:

在寫c++伺服器時發現問題如下: 原始碼: // ConsoleApplicationSock.cpp: 定義控制檯應用程式的入口點。 #include "stdafx.h" #include <winsock.h> #include <st

使用vue時Module build failed: TypeError: this._init is not a function錯誤的解決方法

錯誤描述 整個專案目錄結構如下: src hello.vue main.js index.html package.json webpack.config.js package.json { "name": "test-typeof-vue",

[iOS] This application is modifying the autolayout engine from a background thread after the engine was accessed from the main t

遇到程式掛掉,發出的錯誤訊息: This application is modifying the autolayout engine from a background thread after the engine was accessed from the main thread. This can

Why Stanford Is Not The Answer

On a lazy autumn Sunday, Nikhil received a call from a family friend.“Hey Nikhil, I’m applying to Stanford. Any tips?”“Hey dude! It’s been a while. Tell me