diff --git a/Src/Asp.Net/SqlSugar/ExpressionsToSql/ResolveItems/NewExpressionResolve.cs b/Src/Asp.Net/SqlSugar/ExpressionsToSql/ResolveItems/NewExpressionResolve.cs index 9c2e224b6..55f4c6566 100644 --- a/Src/Asp.Net/SqlSugar/ExpressionsToSql/ResolveItems/NewExpressionResolve.cs +++ b/Src/Asp.Net/SqlSugar/ExpressionsToSql/ResolveItems/NewExpressionResolve.cs @@ -13,6 +13,7 @@ namespace SqlSugar public NewExpressionResolve(ExpressionParameter parameter) : base(parameter) { var expression = base.Expression as NewExpression; + Check.Exception(expression.Type == UtilConstants.GuidType, "Not Support new Guid(), Use Guid.New()"); switch (parameter.Context.ResolveType) { case ResolveExpressType.WhereSingle: