| | |
| | | if (propertyInfo != null) |
| | | { |
| | | sugarColumn = propertyInfo.GetCustomAttribute<SugarColumn>(); |
| | | dbType = propertyInfo != null ? propertyInfo.GetProperWithDbType() : SqlDbTypeName.NVarChar; |
| | | dbType = propertyInfo.PropertyType != null ? propertyInfo.GetProperWithDbType() : SqlDbTypeName.NVarChar; |
| | | } |
| | | dbType = dbType.ToLower(); |
| | | string val = value?.ToString(); |
| | |
| | | { typeof(byte),SqlDbTypeName.Int },//类型待完 |
| | | { typeof(Guid),SqlDbTypeName.UniqueIdentifier} |
| | | }; |
| | | |
| | | public static string GetProperWithDbType(this PropertyInfo propertyInfo) |
| | | { |
| | | bool result = ProperWithDbType.TryGetValue(propertyInfo.PropertyType, out string value); |