ソースを参照

Fixed the connection bug of getting message from table. #83

master
Savorboard 7年前
コミット
2cad4d608b
1個のファイルの変更2行の追加0行の削除
  1. +2
    -0
      src/DotNetCore.CAP.MySql/MySqlStorageConnection.cs

+ 2
- 0
src/DotNetCore.CAP.MySql/MySqlStorageConnection.cs ファイルの表示

@@ -57,6 +57,7 @@ SELECT * FROM `{_prefix}.published` WHERE Id=LAST_INSERT_ID();";

using (var connection = new MySqlConnection(Options.ConnectionString))
{
connection.Open();
connection.Execute("SELECT LAST_INSERT_ID(0)");
return await connection.QueryFirstOrDefaultAsync<CapPublishedMessage>(sql);
}
@@ -103,6 +104,7 @@ SELECT * FROM `{_prefix}.received` WHERE Id=LAST_INSERT_ID();";

using (var connection = new MySqlConnection(Options.ConnectionString))
{
connection.Open();
connection.Execute("SELECT LAST_INSERT_ID(0)");
return await connection.QueryFirstOrDefaultAsync<CapReceivedMessage>(sql);
}


読み込み中…
キャンセル
保存