File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -280,11 +280,11 @@ this method uses a few heuristics to assess the data type of the id column
280280 public string GetIdColumnType ( Query query )
281281 {
282282 var tableColumns = Tables [ query . InsertIntoTable . Schema ] [ query . InsertIntoTable . Name ] . Columns ;
283- var idColumn = tableColumns . First ( c => c . Name . Equals ( "id" , StringComparison . OrdinalIgnoreCase ) ) ;
283+ var idColumn = tableColumns . FirstOrDefault ( c => c . Name . Equals ( "id" , StringComparison . OrdinalIgnoreCase ) ) ;
284284 if ( idColumn is not null )
285285 return GetCsharpType ( idColumn , query ) ;
286286
287- idColumn = tableColumns . First ( c => c . Name . Contains ( "id" , StringComparison . CurrentCultureIgnoreCase ) ) ;
287+ idColumn = tableColumns . FirstOrDefault ( c => c . Name . Contains ( "id" , StringComparison . CurrentCultureIgnoreCase ) ) ;
288288 return GetCsharpType ( idColumn ?? tableColumns [ 0 ] , query ) ;
289289 }
290290
You can’t perform that action at this time.
0 commit comments