Synchronization code

This commit is contained in:
sunkaixuan
2023-07-19 19:10:45 +08:00
parent 061edc3de2
commit 45987aa6da

View File

@@ -658,6 +658,16 @@ namespace SqlSugar
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
expression.Expression!=null&&
expression.Expression is BinaryExpression &&