Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit 299f094

Browse files
committed
fix build error
1 parent 747fc9f commit 299f094

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/ServiceStack.OrmLite/OrmLiteUtils.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ public static Tuple<FieldDefinition, int, IOrmLiteConverter>[] GetIndexFieldsCac
380380

381381
foreach (var fieldDef in remainingFieldDefs)
382382
{
383-
var index = FindColumnIndex(reader, dialect, fieldDef, dbFieldMap);
383+
var index = FindColumnIndex(dialect, fieldDef, dbFieldMap);
384384
if (index != NotFound)
385385
{
386386
cache.Add(Tuple.Create(fieldDef, index, dialect.GetConverterBestMatch(fieldDef)));
@@ -392,20 +392,20 @@ public static Tuple<FieldDefinition, int, IOrmLiteConverter>[] GetIndexFieldsCac
392392
}
393393

394394
private const int NotFound = -1;
395-
internal static int FindColumnIndex(this IDataReader reader, IOrmLiteDialectProvider dialectProvider, FieldDefinition fieldDef, Dictionary<string, int> dbFieldMap)
395+
internal static int FindColumnIndex(IOrmLiteDialectProvider dialectProvider, FieldDefinition fieldDef, Dictionary<string, int> dbFieldMap)
396396
{
397397
var index = NotFound;
398398
if (!dbFieldMap.TryGetValue(fieldDef.FieldName, out index))
399399
{
400-
index = TryGuessColumnIndex(fieldDef.FieldName, reader);
400+
index = TryGuessColumnIndex(fieldDef.FieldName, dbFieldMap);
401401
}
402402

403403
// Try fallback to original field name when overriden by alias
404404
if (index == NotFound && fieldDef.Alias != null && !OrmLiteConfig.DisableColumnGuessFallback)
405405
{
406406
if (!dbFieldMap.TryGetValue(fieldDef.Name, out index))
407407
{
408-
index = TryGuessColumnIndex(fieldDef.Name, reader);
408+
index = TryGuessColumnIndex(fieldDef.Name, dbFieldMap);
409409
}
410410
}
411411

0 commit comments

Comments
 (0)