mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-07-31 15:56:25 +08:00
-
This commit is contained in:
parent
ffb754dd70
commit
e71d2e5efa
@ -9,7 +9,9 @@ namespace SqlSugar
|
||||
internal const string AssemblyName = "SqlSugar";
|
||||
internal const string Space = " ";
|
||||
internal static Type StringType = typeof(string);
|
||||
internal static Type ShortType = typeof(short);
|
||||
internal static Type IntType = typeof(int);
|
||||
internal static Type LongType = typeof(long);
|
||||
internal static Type DecType = typeof(decimal);
|
||||
internal static Type GuidType = typeof(Guid);
|
||||
internal static Type DateType = typeof(DateTime);
|
||||
|
@ -13,7 +13,8 @@ namespace SqlSugar
|
||||
{
|
||||
this.Value = value;
|
||||
this.ParameterName = name;
|
||||
if (value != null) {
|
||||
if (value != null)
|
||||
{
|
||||
SettingDataType(value.GetType());
|
||||
}
|
||||
}
|
||||
@ -38,10 +39,22 @@ namespace SqlSugar
|
||||
{
|
||||
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)
|
||||
{
|
||||
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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user