@@ -34,9 +34,7 @@ public SqliteCommand()
3434 /// </summary>
3535 /// <param name="commandText">The SQL to execute against the database.</param>
3636 public SqliteCommand ( string commandText )
37- {
38- CommandText = commandText ;
39- }
37+ => CommandText = commandText ;
4038
4139 /// <summary>
4240 /// Initializes a new instance of the <see cref="SqliteCommand" /> class.
@@ -45,9 +43,7 @@ public SqliteCommand(string commandText)
4543 /// <param name="connection">The connection used by the command.</param>
4644 public SqliteCommand ( string commandText , SqliteConnection connection )
4745 : this ( commandText )
48- {
49- Connection = connection ;
50- }
46+ => Connection = connection ;
5147
5248 /// <summary>
5349 /// Initializes a new instance of the <see cref="SqliteCommand" /> class.
@@ -57,9 +53,7 @@ public SqliteCommand(string commandText, SqliteConnection connection)
5753 /// <param name="transaction">The transaction within which the command executes.</param>
5854 public SqliteCommand ( string commandText , SqliteConnection connection , SqliteTransaction transaction )
5955 : this ( commandText , connection )
60- {
61- Transaction = transaction ;
62- }
56+ => Transaction = transaction ;
6357
6458 /// <summary>
6559 /// Gets or sets a value indicating how <see cref="CommandText" /> is interpreted. Only
@@ -199,8 +193,7 @@ public override void Prepare()
199193 throw new ArgumentException ( Resources . InvalidCommandBehavior ( behavior ) ) ;
200194 }
201195
202- if ( Connection == null
203- || Connection . State != ConnectionState . Open )
196+ if ( Connection ? . State != ConnectionState . Open )
204197 {
205198 throw new InvalidOperationException ( Resources . CallRequiresOpenConnection ( nameof ( ExecuteReader ) ) ) ;
206199 }
@@ -224,7 +217,7 @@ public override void Prepare()
224217
225218 var hasChanges = false ;
226219 var changes = 0 ;
227- var stmts = new Queue < Tuple < sqlite3_stmt , bool > > ( ) ;
220+ var stmts = new Queue < ( sqlite3_stmt , bool ) > ( ) ;
228221 var tail = CommandText ;
229222
230223 do
@@ -303,7 +296,7 @@ public override void Prepare()
303296 // will result in unexpected corner cases, but it's the best we can do without re-parsing SQL
304297 if ( raw . sqlite3_stmt_readonly ( stmt ) != 0 )
305298 {
306- stmts . Enqueue ( Tuple . Create ( stmt , rc != raw . SQLITE_DONE ) ) ;
299+ stmts . Enqueue ( ( stmt , rc != raw . SQLITE_DONE ) ) ;
307300 }
308301 else
309302 {
@@ -399,8 +392,7 @@ protected override async Task<DbDataReader> ExecuteDbDataReaderAsync(
399392 /// <exception cref="SqliteException">A SQLite error occurs during execution.</exception>
400393 public override int ExecuteNonQuery ( )
401394 {
402- if ( Connection == null
403- || Connection . State != ConnectionState . Open )
395+ if ( Connection ? . State != ConnectionState . Open )
404396 {
405397 throw new InvalidOperationException ( Resources . CallRequiresOpenConnection ( nameof ( ExecuteNonQuery ) ) ) ;
406398 }
@@ -422,8 +414,7 @@ public override int ExecuteNonQuery()
422414 /// <exception cref="SqliteException">A SQLite error occurs during execution.</exception>
423415 public override object ExecuteScalar ( )
424416 {
425- if ( Connection == null
426- || Connection . State != ConnectionState . Open )
417+ if ( Connection ? . State != ConnectionState . Open )
427418 {
428419 throw new InvalidOperationException ( Resources . CallRequiresOpenConnection ( nameof ( ExecuteScalar ) ) ) ;
429420 }
0 commit comments