Skip to content

Commit c2d32a4

Browse files
committed
Fix null value warning
1 parent 4913279 commit c2d32a4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tests/PhenX.EntityFrameworkCore.BulkInsert.Benchmark/GetValueComparator.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ public void IterationSetup()
2828
}).ToList();
2929
}
3030

31-
private static Dictionary<string, Expression<Func<object?, object?>>> Converters = new()
31+
private static readonly Dictionary<string, Expression<Func<object?, object?>>> Converters = new()
3232
{
33-
{ nameof(TestEntity.NumericEnumValue), v => (int) v},
33+
{ nameof(TestEntity.NumericEnumValue), v => (int) (v ?? 1)},
3434
};
3535

3636
private static readonly PropertyInfo[] PropertyInfos = typeof(TestEntity).GetProperties();

0 commit comments

Comments
 (0)