TimeSpan BUG

This commit is contained in:
610262374@qq.com
2018-12-18 17:02:10 +08:00
parent dd7bd5f9a7
commit d61388a5d5
2 changed files with 7 additions and 2 deletions

View File

@@ -25,14 +25,14 @@ namespace SqlSugar
this.ParameterName = name;
SettingDataType(type);
}
public SugarParameter(string name, object value, Type type,ParameterDirection direction)
public SugarParameter(string name, object value, Type type, ParameterDirection direction)
{
this.Value = value;
this.ParameterName = name;
this.Direction = direction;
SettingDataType(type);
}
public SugarParameter(string name, object value, Type type, ParameterDirection direction,int size)
public SugarParameter(string name, object value, Type type, ParameterDirection direction, int size)
{
this.Value = value;
this.ParameterName = name;
@@ -95,6 +95,10 @@ namespace SqlSugar
{
this.DbType = System.Data.DbType.DateTimeOffset;
}
else if (type == UtilConstants.TimeSpanType)
{
this.Value = this.Value.ToString();
}
}
public SugarParameter(string name, object value, bool isOutput)

View File

@@ -29,6 +29,7 @@ namespace SqlSugar
internal static Type StringType = typeof(string);
internal static Type DateType = typeof(DateTime);
internal static Type DateTimeOffsetType = typeof(DateTimeOffset);
internal static Type TimeSpanType = typeof(TimeSpan);
internal static Type ByteArrayType = typeof(byte[]);
internal static Type ModelType= typeof(ModelContext);
internal static Type DynamicType = typeof(ExpandoObject);