mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-19 04:18:16 +08:00
- maintain CreateInstanceGetDefaultValue
This commit is contained in:
@ -131,6 +131,7 @@ public static partial class FreeSqlGlobalExtensions
|
||||
if (that == null) return null;
|
||||
if (that == typeof(string)) return default(string);
|
||||
if (that == typeof(Guid)) return default(Guid);
|
||||
if (that == typeof(byte[])) return default(byte[]);
|
||||
if (that.IsArray) return Array.CreateInstance(that.GetElementType(), 0);
|
||||
if (that.IsInterface || that.IsAbstract) return null;
|
||||
var ctorParms = that.InternalGetTypeConstructor0OrFirst(false)?.GetParameters();
|
||||
|
Reference in New Issue
Block a user