AppDbContext: Fix silent fail in ExecuteBatch()

This commit is contained in:
2025-12-11 16:08:11 +01:00
parent 495aa8a691
commit f228ba3019

View File

@@ -120,7 +120,8 @@ namespace Elwig.Helpers {
public static async Task ExecuteBatch(SqliteConnection cnx, string sql) { public static async Task ExecuteBatch(SqliteConnection cnx, string sql) {
using var cmd = cnx.CreateCommand(); using var cmd = cnx.CreateCommand();
cmd.CommandText = sql; cmd.CommandText = sql;
await (await cmd.ExecuteReaderAsync()).CloseAsync(); using var reader = await cmd.ExecuteReaderAsync();
while (await reader.NextResultAsync());
} }
public static async Task ExecuteEmbeddedScript(SqliteConnection cnx, Assembly asm, string name) { public static async Task ExecuteEmbeddedScript(SqliteConnection cnx, Assembly asm, string name) {