mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-18 20:08:15 +08:00
- continue
This commit is contained in:
@ -108,18 +108,6 @@ namespace FreeSql.SqlServer
|
||||
if (value == null) return "NULL";
|
||||
if (type.IsNumberType()) return string.Format(CultureInfo.InvariantCulture, "{0}", value);
|
||||
if (type == typeof(byte[])) return $"0x{CommonUtils.BytesSqlRaw(value as byte[])}";
|
||||
if (type == typeof(TimeSpan) || type == typeof(TimeSpan?))
|
||||
{
|
||||
var ts = (TimeSpan)value;
|
||||
value = $"{ts.Hours}:{ts.Minutes}:{ts.Seconds}.{ts.Milliseconds}";
|
||||
}
|
||||
#if net60
|
||||
if (type == typeof(TimeOnly) || type == typeof(TimeOnly?))
|
||||
{
|
||||
var ts = (TimeOnly)value;
|
||||
value = $"{ts.Hour}:{ts.Minute}:{ts.Second}.{ts.Millisecond}";
|
||||
}
|
||||
#endif
|
||||
return string.Format(CultureInfo.InvariantCulture, "{0}", (_orm.Ado as AdoProvider).AddslashesProcessParam(value, type, col));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user