Skip to content

Commit 1b4d848

Browse files
committed
move variable
1 parent 5e81b63 commit 1b4d848

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

NorthwindCRUD/Providers/DbContextConfigurationProvider.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,11 @@ public void ConfigureOptions(DbContextOptionsBuilder options)
3434
{
3535
var tenantId = GetTenantId();
3636

37-
var connectionString = this.GetSqlLiteConnectionString(tenantId);
38-
3937
var cacheKey = string.Format(DatabaseConnectionCacheKey, tenantId);
4038

4139
if (!memoryCache.TryGetValue(cacheKey, out SqliteConnection connection))
4240
{
41+
var connectionString = this.GetSqlLiteConnectionString(tenantId);
4342
connection = new SqliteConnection(connectionString);
4443
memoryCache.Set(cacheKey, connection, GetCacheConnectionEntryOptions());
4544
}

0 commit comments

Comments
 (0)