Skip to content

Commit

Permalink
ResolveSelect.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
DotNetNext committed Oct 19, 2016
1 parent ebffde7 commit a6cfb4d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion SqlSugar/Core/ResolveExpress/ResolveSelect.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ internal static void GetResult<TResult>(string expStr, Queryable<TResult> reval,
private static bool IsComplexAnalysis(string expStr)
{
string errorFunName = null;
if (expStr.IsValuable()&&expStr.Contains("+<>"))
if (expStr.IsValuable() && (expStr.Contains("+<>") || Regex.IsMatch(expStr, @"\.[a-z,A-Z,_]\w*\.[a-z,A-Z,_]\w*?(\,|\})")))
{
throw new SqlSugarException("Select中的拉姆达表达式,不支持外部传参数,目前支持的写法 Where(\"1=1\",new {id=1}).Select(it=>{ id=\"" + SqlSugarTool.ParSymbol + "id\".ObjToInt()}");
}
Expand Down

0 comments on commit a6cfb4d

Please sign in to comment.