mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-22 20:13:41 +08:00
-
This commit is contained in:
@@ -9,7 +9,9 @@ namespace SqlSugar
|
|||||||
internal const string AssemblyName = "SqlSugar";
|
internal const string AssemblyName = "SqlSugar";
|
||||||
internal const string Space = " ";
|
internal const string Space = " ";
|
||||||
internal static Type StringType = typeof(string);
|
internal static Type StringType = typeof(string);
|
||||||
|
internal static Type ShortType = typeof(short);
|
||||||
internal static Type IntType = typeof(int);
|
internal static Type IntType = typeof(int);
|
||||||
|
internal static Type LongType = typeof(long);
|
||||||
internal static Type DecType = typeof(decimal);
|
internal static Type DecType = typeof(decimal);
|
||||||
internal static Type GuidType = typeof(Guid);
|
internal static Type GuidType = typeof(Guid);
|
||||||
internal static Type DateType = typeof(DateTime);
|
internal static Type DateType = typeof(DateTime);
|
||||||
|
@@ -13,7 +13,8 @@ namespace SqlSugar
|
|||||||
{
|
{
|
||||||
this.Value = value;
|
this.Value = value;
|
||||||
this.ParameterName = name;
|
this.ParameterName = name;
|
||||||
if (value != null) {
|
if (value != null)
|
||||||
|
{
|
||||||
SettingDataType(value.GetType());
|
SettingDataType(value.GetType());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -38,10 +39,22 @@ namespace SqlSugar
|
|||||||
{
|
{
|
||||||
this.DbType = System.Data.DbType.Int32;
|
this.DbType = System.Data.DbType.Int32;
|
||||||
}
|
}
|
||||||
|
else if (type == PubConst.ShortType)
|
||||||
|
{
|
||||||
|
this.DbType = System.Data.DbType.Int16;
|
||||||
|
}
|
||||||
|
else if (type == PubConst.LongType)
|
||||||
|
{
|
||||||
|
this.DbType = System.Data.DbType.Int64;
|
||||||
|
}
|
||||||
else if (type == PubConst.DateType)
|
else if (type == PubConst.DateType)
|
||||||
{
|
{
|
||||||
this.DbType = System.Data.DbType.Date;
|
this.DbType = System.Data.DbType.Date;
|
||||||
}
|
}
|
||||||
|
else if (type == PubConst.DobType)
|
||||||
|
{
|
||||||
|
this.DbType = System.Data.DbType.Double;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
public SugarParameter(string name, object value, bool isOutput)
|
public SugarParameter(string name, object value, bool isOutput)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user