File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,10 +12,11 @@ public static void SeedXkcd(this IDbConnection db)
1212 {
1313 var allLines = "static_data/xkcd-metadata.jsonl"
1414 . ReadAllText ( ) . Split ( "\n " ) ;
15- using var jsonConfig = JsConfig . With ( new Config
16- {
15+
16+ using var jsonConfig = JsConfig . With ( new Config {
1717 TextCase = TextCase . SnakeCase
1818 } ) ;
19+
1920 var comics = allLines
2021 . Where ( x => ! x . IsNullOrEmpty ( ) )
2122 . Select ( JsonSerializer . DeserializeFromString < XkcdComic > )
@@ -27,15 +28,15 @@ public static void SeedXkcd(this IDbConnection db)
2728 foreach ( var comic in comics )
2829 {
2930 var dimension = dimensions . FirstOrDefault ( x => x ? . Id == comic . Id ) ;
30- if ( dimension == null )
31- {
32- continue ;
33- }
31+ if ( dimension == null ) continue ;
32+
3433 comic . Width = dimension . Width ;
3534 comic . Height = dimension . Height ;
3635 }
3736
38- if ( db . CreateTableIfNotExists < XkcdComic > ( ) )
37+ if ( db . CreateTableIfNotExists < XkcdComic > ( ) )
38+ {
3939 db . InsertAll ( comics ) ;
40+ }
4041 }
41- }
42+ }
You can’t perform that action at this time.
0 commit comments