Skip to content

Commit 96915ca

Browse files
committed
Fix for .net 4.0.
1 parent d607199 commit 96915ca

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

SQLite.CodeFirst/Extensions/EntityTypeExtension.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ public static string GetTableName(this EntityType entityType)
2424
Type metadataPropertyValueType = metadataProperty.Value.GetType();
2525

2626
// The type DatabaseName is internal. So we need reflection...
27-
var name = (string)metadataPropertyValueType.GetProperty("Name").GetValue(metadataPropertyValue);
27+
// GetValue() overload with one value was introduces in .net 4.5 so use the overload with two parameters.
28+
var name = (string)metadataPropertyValueType.GetProperty("Name").GetValue(metadataPropertyValue, null);
2829

2930
return TableNameCreator.CreateTableName(name);
3031
}

0 commit comments

Comments
 (0)