File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 1- using Microsoft . Data . Sqlite ;
1+ using System . Globalization ;
2+ using Microsoft . Data . Sqlite ;
23using Microsoft . EntityFrameworkCore ;
34using Microsoft . Extensions . Caching . Memory ;
45using NorthwindCRUD . Helpers ;
@@ -34,7 +35,7 @@ public void ConfigureOptions(DbContextOptionsBuilder options)
3435 {
3536 var tenantId = GetTenantId ( ) ;
3637
37- var cacheKey = string . Format ( DatabaseConnectionCacheKey , tenantId ) ;
38+ var cacheKey = string . Format ( CultureInfo . InvariantCulture , DatabaseConnectionCacheKey , tenantId ) ;
3839
3940 if ( ! memoryCache . TryGetValue ( cacheKey , out SqliteConnection connection ) )
4041 {
@@ -81,7 +82,7 @@ private MemoryCacheEntryOptions GetCacheConnectionEntryOptions()
8182 private string GetSqlLiteConnectionString ( string tenantId )
8283 {
8384 var connectionStringTemplate = configuration . GetConnectionString ( "SQLiteConnectionString" ) ;
84- var unsanitizedConntectionString = string . Format ( connectionStringTemplate , tenantId ) ;
85+ var unsanitizedConntectionString = string . Format ( CultureInfo . InvariantCulture , connectionStringTemplate , tenantId ) ;
8586 var connectionStringBuilder = new SqliteConnectionStringBuilder ( unsanitizedConntectionString ) ;
8687 var sanitizedConntectionString = connectionStringBuilder . ToString ( ) ;
8788
You can’t perform that action at this time.
0 commit comments