mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-19 01:58:13 +08:00
4.2.0.8
This commit is contained in:
@@ -30,6 +30,8 @@ namespace OrmTest.UnitTest
|
||||
var data = db.Queryable<StudentEnum>().AS("student").InSingle(id);
|
||||
shoolValue = SchoolEnum.UniversityOfOxford;
|
||||
var sql= db.Updateable<StudentEnum>().AS("student").UpdateColumns(it=>new StudentEnum() { Name="a" , SchoolId= shoolValue }).Where(it=>it.Id==id).ToSql();
|
||||
|
||||
var sql2 = db.Updateable<StudentEnum>().AS("student").UpdateColumns(it => new StudentEnum() { Name = "a", SchoolId = SchoolEnum.UniversityOfOxford }).Where(it => it.Id == id).ToSql();
|
||||
}
|
||||
}
|
||||
}
|
@@ -46,6 +46,16 @@ namespace SqlSugar
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static object GetValue(object value)
|
||||
{
|
||||
if (value == null) return value;
|
||||
var type = value.GetType();
|
||||
if (type.IsEnum()&& type != typeof(DateType)&& type!=typeof(JoinType)&&type!=typeof(OrderByType)) return Convert.ToInt64(value);
|
||||
else
|
||||
return value;
|
||||
}
|
||||
|
||||
public static bool IsLogicOperator(string operatorValue)
|
||||
{
|
||||
return operatorValue == "&&" || operatorValue == "||";
|
||||
|
@@ -12,7 +12,7 @@ namespace SqlSugar
|
||||
{
|
||||
var expression = base.Expression as ConstantExpression;
|
||||
var isLeft = parameter.IsLeft;
|
||||
object value = expression.Value;
|
||||
object value = ExpressionTool.GetValue(expression.Value);
|
||||
var baseParameter = parameter.BaseParameter;
|
||||
baseParameter.ChildExpression = expression;
|
||||
var isSetTempData = baseParameter.CommonTempData.IsValuable() && baseParameter.CommonTempData.Equals(CommonTempDataType.Result);
|
||||
|
@@ -31,5 +31,5 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("4.2.0.7")]
|
||||
[assembly: AssemblyFileVersion("4.2.0.7")]
|
||||
[assembly: AssemblyVersion("4.2.0.8")]
|
||||
[assembly: AssemblyFileVersion("4.2.0.8")]
|
||||
|
Reference in New Issue
Block a user