Skip to content

Commit ac579b0

Browse files
Copilotaaronpowell
andcommitted
Make CreateConnection return explicit instead of using local variable
Co-authored-by: aaronpowell <434140+aaronpowell@users.noreply.github.com>
1 parent 14211a6 commit ac579b0

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/CommunityToolkit.Aspire.Microsoft.Data.Sqlite/AspireSqliteExtensions.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,7 @@ private static void RegisterSqliteServices(
102102
SqliteConnection CreateConnection(IServiceProvider sp, object? key)
103103
{
104104
ConnectionStringValidation.ValidateConnectionString(settings.ConnectionString, connectionName, DefaultConfigSectionName);
105-
var connection = new SqliteConnection(settings.ConnectionString);
106-
return connection;
105+
return new SqliteConnection(settings.ConnectionString);
107106
}
108107
}
109108
}

0 commit comments

Comments
 (0)