Updated requests to use voice store when possible.

This commit is contained in:
Tom
2024-10-17 19:07:00 +00:00
parent 88104484f6
commit 0a2392b957
5 changed files with 35 additions and 29 deletions

View File

@ -79,13 +79,13 @@ namespace HermesSocketLibrary.db
}
}
public async Task<int> Execute(string sql, Action<NpgsqlCommand> action)
public async Task<int> Execute(string sql, Action<NpgsqlCommand> prepare)
{
using (var connection = await _source.OpenConnectionAsync())
{
using (var command = new NpgsqlCommand(sql, connection))
{
action(command);
prepare(command);
await command.PrepareAsync();
return await command.ExecuteNonQueryAsync();