Skip to content

Commit 2dd8beb

Browse files
committed
Used implicit type assignment for variable
When I moved the `SqlCommand` assignments outside of the `try/catch` blocks (see #8590d46), that opened up the ability to use implicit typing for variables. (Technically, that could have been done previously—and, in fact, was for other cases; but it definitely makes more sense now that the values aren't being initialized to `null`.)
1 parent 341fc48 commit 2dd8beb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

OnTopic.Data.Sql/SqlTopicRepository.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,7 @@ public override void Delete(Topic topic, bool isRecursive = false) {
495495
| Delete from database
496496
\-----------------------------------------------------------------------------------------------------------------------*/
497497
var connection = new SqlConnection(_connectionString);
498-
SqlCommand? command = new SqlCommand("DeleteTopic", connection) {
498+
var command = new SqlCommand("DeleteTopic", connection) {
499499
CommandType = CommandType.StoredProcedure
500500
};
501501

0 commit comments

Comments
 (0)