Skip to content

Commit c737c56

Browse files
committed
3.5.2.7
1 parent 80d5d24 commit c737c56

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

OracleSugar.suo

0 Bytes
Binary file not shown.

SqlSugar/OracleSugar.nuspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<package >
33
<metadata>
44
<id>oracleSugar</id>
5-
<version>3.5.2.6</version>
5+
<version>3.5.2.7</version>
66
<title>OracleSugar ORM</title>
77
<authors>sun kaixuan</authors>
88
<owners>landa</owners>

SqlSugar/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@
3232
// 可以指定所有这些值,也可以使用“内部版本号”和“修订号”的默认值,
3333
// 方法是按如下所示使用“*”:
3434
// [assembly: AssemblyVersion("1.0.*")]
35-
[assembly: AssemblyVersion("3.5.2.6")]
36-
[assembly: AssemblyFileVersion("3.5.2.6")]
35+
[assembly: AssemblyVersion("3.5.2.7")]
36+
[assembly: AssemblyFileVersion("3.5.2.7")]

SqlSugar/SqlSugarClient.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -690,7 +690,7 @@ public object Insert<T>(T entity, bool isIdentity = true) where T : class
690690

691691
if (prop.PropertyType.IsEnum)
692692
{
693-
val = (int)(val);
693+
val = Convert.ToInt64(val);
694694
}
695695
var isNullabletrue=false;
696696
var underType = SqlSugarTool.GetUnderType(prop, ref isNullabletrue);
@@ -1274,7 +1274,7 @@ public bool Delete<T>(T deleteObj)
12741274
var pkValue = type.GetProperty(pkClassPropName).GetValue(deleteObj, null);
12751275
if (pkValue.GetType().IsEnum)
12761276
{
1277-
pkValue = pkValue.ObjToInt();
1277+
pkValue =Convert.ToInt64(pkValue);
12781278
}
12791279
Check.Exception(pkValue == DBNull.Value, typeName + "主键的值不能为DBNull.Value。");
12801280
whereString += string.Format(" AND {0}={1} ", pkName.GetTranslationSqlName(), pkName.GetOracleParameterName());

SqlSugar/Tool/SqlSugarTool.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ public static OracleParameter[] GetParameters(object obj,PropertyInfo [] pis=nul
179179
var value = r.GetValue(obj, null);
180180
if (r.PropertyType.IsEnum)
181181
{
182-
value = (int)value;
182+
value = Convert.ToInt64(value);
183183
}
184184
if (value == null) value = DBNull.Value;
185185
if (r.Name.ToLower().Contains("hierarchyid"))
@@ -246,7 +246,7 @@ internal static Dictionary<string, object> GetObjectToDictionary(object obj)
246246
var val = r.GetValue(obj, null);
247247
if (r.PropertyType.IsEnum)
248248
{
249-
val = (int)val;
249+
val =Convert.ToInt64(val);
250250
}
251251
reval.Add(r.Name, val == null ? DBNull.Value : val);
252252
}

0 commit comments

Comments
 (0)