diff --git a/Elwig/Helpers/AppDbContext.cs b/Elwig/Helpers/AppDbContext.cs index 57e791c..f3b013e 100644 --- a/Elwig/Helpers/AppDbContext.cs +++ b/Elwig/Helpers/AppDbContext.cs @@ -120,7 +120,8 @@ namespace Elwig.Helpers { public static async Task ExecuteBatch(SqliteConnection cnx, string sql) { using var cmd = cnx.CreateCommand(); 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) {