Browse Source

Update SugarParamter

pull/12/MERGE
sunkaixuan 8 years ago
parent
commit
53f74d298b
  1. 1
      SqlSugar/Common/PubConst.cs
  2. 12
      SqlSugar/ExpressionsToSql/Common/SugarParameter.cs

1
SqlSugar/Common/PubConst.cs

@ -20,6 +20,7 @@ namespace SqlSugar
internal static Type BoolType = typeof(bool);
internal static Type ObjType = typeof(object);
internal static Type DobType = typeof(double);
internal static Type FloatType=typeof(float);
internal static Type ModelType= typeof(ModelContext);
internal static Type DicSS = typeof(KeyValuePair<string, string>);
internal static Type DicSi = typeof(KeyValuePair<string, int>);

12
SqlSugar/ExpressionsToSql/Common/SugarParameter.cs

@ -55,6 +55,18 @@ namespace SqlSugar
{
this.DbType = System.Data.DbType.Double;
}
else if (type == PubConst.DecType)
{
this.DbType = System.Data.DbType.Decimal;
}
else if (type == PubConst.ByteType)
{
this.DbType = System.Data.DbType.Byte;
}
else if (type == PubConst.FloatType)
{
this.DbType = System.Data.DbType.Single;
}
}
public SugarParameter(string name, object value, bool isOutput)
{

Loading…
Cancel
Save