From 248be3320f7a48dd462d290725483c853ddbfa2e Mon Sep 17 00:00:00 2001 From: Railz Date: Thu, 28 Mar 2019 14:13:51 +0100 Subject: [PATCH] Fixed table-name not getting picked --- Database-Attribute_System/QueryBuilder.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Database-Attribute_System/QueryBuilder.cs b/Database-Attribute_System/QueryBuilder.cs index 796c42d..690d0ea 100644 --- a/Database-Attribute_System/QueryBuilder.cs +++ b/Database-Attribute_System/QueryBuilder.cs @@ -26,7 +26,7 @@ namespace eu.railduction.netcore.dll.Database_Attribute_System { // Check if class has attribute 'DbObject' and get the database table-name if (!(classType.GetCustomAttribute(typeof(DbObject), true) is DbObject dbObjectAttribute)) throw new InvalidOperationException("Cannot generate SQL-Query of class. Missing Attribute 'DbObject'"); - string tableName = dbObjectAttribute._tableName ?? dbObjectAttribute._tableName; // If no alternative table-name is specified, use the class-name + string tableName = dbObjectAttribute._tableName ?? classType.Name; // If no alternative table-name is specified, use the class-name // Iterate thru all properties List dbPrimaryKeys = new List() { };