From c7b9f67004c97f9194afa0041d9f9183ead08e2f Mon Sep 17 00:00:00 2001 From: Railz Date: Mon, 30 Sep 2019 18:36:18 +0200 Subject: [PATCH] Fixed List-detection --- Database-Attribute_System/Attributes/DbReverseForeignObject.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Database-Attribute_System/Attributes/DbReverseForeignObject.cs b/Database-Attribute_System/Attributes/DbReverseForeignObject.cs index 7a25f26..6c5b6d4 100644 --- a/Database-Attribute_System/Attributes/DbReverseForeignObject.cs +++ b/Database-Attribute_System/Attributes/DbReverseForeignObject.cs @@ -38,7 +38,7 @@ namespace eu.railduction.netcore.dll.Database_Attribute_System.Attributes if (_foreignKeyName == null) _foreignKeyName = classAttribute.primaryKeyAttributes[0]._attributeName; // If its a List, get inner type - if (!(fi.FieldType.IsGenericType && (fi.FieldType.GetGenericTypeDefinition() == typeof(List<>)))) + if (fi.FieldType.IsGenericType && (fi.FieldType.GetGenericTypeDefinition() == typeof(List<>))) { // Check the generic list and get inner-type foreach (Type interfaceType in fi.FieldType.GetInterfaces())