SugarParameter init type

This commit is contained in:
sunkaixuan 2022-05-30 15:27:41 +08:00
parent 57675b2670
commit 4d55dace23
2 changed files with 15 additions and 0 deletions

View File

@ -138,6 +138,18 @@ namespace SqlSugar
this.DbType = System.Data.DbType.Int64;
this.Value = Convert.ToInt64(Value);
}
else if (type==UtilConstants.UIntType)
{
this.DbType = System.Data.DbType.UInt32;
}
else if (type == UtilConstants.ULongType)
{
this.DbType = System.Data.DbType.UInt64;
}
else if (type == UtilConstants.ShortType)
{
this.DbType = System.Data.DbType.UInt16;
}
}
public SugarParameter(string name, object value, bool isOutput)

View File

@ -15,6 +15,9 @@ namespace SqlSugar
internal const string ReplaceKey = "{662E689B-17A1-4D06-9D27-F29EAB8BC3D6}";
internal const string ReplaceCommaKey = "{112A689B-17A1-4A06-9D27-A39EAB8BC3D5}";
internal static Type UShortType = typeof(ushort);
internal static Type ULongType = typeof(ulong);
internal static Type UIntType = typeof(uint);
internal static Type IntType = typeof(int);
internal static Type LongType = typeof(long);
internal static Type GuidType = typeof(Guid);