Json 2 sql

This commit is contained in:
sunkaixuan 2023-09-20 21:32:57 +08:00
parent 4c2e48529d
commit fca301b195
3 changed files with 13 additions and 1 deletions

View File

@ -82,7 +82,12 @@ namespace SqlSugar
this.QueryableObj = method.Invoke(QueryableObj, new object[] { groupBySql });
return this;
}
public QueryMethodInfo Where(string expShortName, FormattableString expressionString)
{
var method = QueryableObj.GetType().GetMyMethod("Where", 2, typeof(string),typeof(FormattableString));
this.QueryableObj = method.Invoke(QueryableObj, new object[] { expShortName, expressionString });
return this;
}
public QueryMethodInfo Where(List<IConditionalModel> conditionalModels)
{
var method = QueryableObj.GetType().GetMyMethod("Where", 1, typeof(List<IConditionalModel>));

View File

@ -917,6 +917,12 @@ namespace SqlSugar
}
return this;
}
public virtual ISugarQueryable<T> Where(string expShortName, FormattableString expressionString)
{
var exp = DynamicCoreHelper.GetWhere<T>(expShortName, expressionString);
_Where(exp);
return this;
}
public virtual ISugarQueryable<T> Where(Expression<Func<T, bool>> expression)
{
this._Where(expression);

View File

@ -84,6 +84,7 @@ namespace SqlSugar
ISugarQueryable<T> WhereColumns(Dictionary<string, object> columns);
ISugarQueryable<T> TranLock(DbLockType? LockType = DbLockType.Wait);
ISugarQueryable<T> Where(Expression<Func<T, bool>> expression);
ISugarQueryable<T> Where(string expShortName, FormattableString expressionString);
ISugarQueryable<T> Where(string whereString, object parameters = null);
ISugarQueryable<T> Where(IFuncModel funcModel);
ISugarQueryable<T> Where(List<IConditionalModel> conditionalModels);