mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-22 20:13:41 +08:00
Update exp to sql
This commit is contained in:
@@ -658,6 +658,16 @@ namespace SqlSugar
|
|||||||
|
|
||||||
private static bool IsDateDiff(MemberExpression expression)
|
private static bool IsDateDiff(MemberExpression expression)
|
||||||
{
|
{
|
||||||
|
if (expression.Expression != null &&
|
||||||
|
expression.Expression is BinaryExpression)
|
||||||
|
{
|
||||||
|
var binExp = (expression.Expression as BinaryExpression);
|
||||||
|
var nodeType= binExp.NodeType;
|
||||||
|
if (nodeType == ExpressionType.Subtract&& binExp.Left.Type==UtilConstants.DateType && binExp.Right.Type == UtilConstants.DateType)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
return
|
return
|
||||||
expression.Expression!=null&&
|
expression.Expression!=null&&
|
||||||
expression.Expression is BinaryExpression &&
|
expression.Expression is BinaryExpression &&
|
||||||
|
Reference in New Issue
Block a user