mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-19 18:22:23 +08:00
Update dynamic where
This commit is contained in:
@@ -952,6 +952,11 @@ namespace SqlSugar
|
|||||||
}
|
}
|
||||||
public virtual ISugarQueryable<T> Where(string expShortName, FormattableString expressionString)
|
public virtual ISugarQueryable<T> Where(string expShortName, FormattableString expressionString)
|
||||||
{
|
{
|
||||||
|
if (expressionString == null&& !Regex.IsMatch(expShortName,@"^\w$"))
|
||||||
|
{
|
||||||
|
return this.Where(expShortName, new { });
|
||||||
|
}
|
||||||
|
|
||||||
var exp = DynamicCoreHelper.GetWhere<T>(expShortName, expressionString);
|
var exp = DynamicCoreHelper.GetWhere<T>(expShortName, expressionString);
|
||||||
_Where(exp);
|
_Where(exp);
|
||||||
return this;
|
return this;
|
||||||
|
Reference in New Issue
Block a user