mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-04-22 18:52:50 +08:00
- maintain CreateInstanceGetDefaultValue
This commit is contained in:
parent
8ca75db2a4
commit
1a05d63a96
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user