diff options
| author | cvium <clausvium@gmail.com> | 2023-08-21 12:46:30 +0200 |
|---|---|---|
| committer | cvium <clausvium@gmail.com> | 2023-08-21 12:46:30 +0200 |
| commit | 0867812c1fabfce52abb1f8fdb17edad822a61af (patch) | |
| tree | fd4d958901bb6f76144e6a70d96bf914dcffd355 | |
| parent | f2d78425638c96485d1effd41bdc7e271ad8029f (diff) | |
more using
| -rw-r--r-- | Emby.Server.Implementations/Data/SqliteExtensions.cs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Emby.Server.Implementations/Data/SqliteExtensions.cs b/Emby.Server.Implementations/Data/SqliteExtensions.cs index 541153af2..027771a5a 100644 --- a/Emby.Server.Implementations/Data/SqliteExtensions.cs +++ b/Emby.Server.Implementations/Data/SqliteExtensions.cs @@ -68,7 +68,7 @@ namespace Emby.Server.Implementations.Data sqliteConnection.Open(); } - var command = sqliteConnection.CreateCommand(); + using var command = sqliteConnection.CreateCommand(); command.CommandText = commandText; using (var reader = command.ExecuteReader()) { @@ -82,7 +82,7 @@ namespace Emby.Server.Implementations.Data public static void Execute(this SqliteConnection sqliteConnection, string commandText) { sqliteConnection.EnsureOpen(); - var command = sqliteConnection.CreateCommand(); + using var command = sqliteConnection.CreateCommand(); command.CommandText = commandText; command.ExecuteNonQuery(); } @@ -109,7 +109,7 @@ namespace Emby.Server.Implementations.Data { sqliteConnection.EnsureOpen(); - var command = sqliteConnection.CreateCommand(); + using var command = sqliteConnection.CreateCommand(); command.CommandText = commandText; command.ExecuteNonQuery(); } @@ -333,7 +333,7 @@ namespace Emby.Server.Implementations.Data public static void MoveNext(this SqliteCommand sqliteCommand) { sqliteCommand.Prepare(); - var result = sqliteCommand.ExecuteNonQuery(); + sqliteCommand.ExecuteNonQuery(); } public static byte[] GetBlob(this SqliteDataReader reader, int index) |
