mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-22 20:13:41 +08:00
Synchronization code
This commit is contained in:
@@ -516,6 +516,15 @@ namespace SqlSugar
|
|||||||
tempPrimaryKeys = null;
|
tempPrimaryKeys = null;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public IDeleteable<T> In<PkType>(Expression<Func<T, object>> inField, ISugarQueryable<PkType> childQueryExpression)
|
||||||
|
{
|
||||||
|
var lamResult = DeleteBuilder.GetExpressionValue(inField, ResolveExpressType.FieldSingle);
|
||||||
|
var fieldName = lamResult.GetResultString();
|
||||||
|
var sql= childQueryExpression.ToSql();
|
||||||
|
Where($" {fieldName} IN ( {sql.Key} ) ",sql.Value);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
public IDeleteable<T> In<PkType>(string inField, List<PkType> primaryKeyValues)
|
public IDeleteable<T> In<PkType>(string inField, List<PkType> primaryKeyValues)
|
||||||
{
|
{
|
||||||
tempPrimaryKeys = new List<string>() { inField };
|
tempPrimaryKeys = new List<string>() { inField };
|
||||||
|
@@ -29,6 +29,8 @@ namespace SqlSugar
|
|||||||
IDeleteable<T> In<PkType>(Expression<Func<T,object>> inField,PkType primaryKeyValue);
|
IDeleteable<T> In<PkType>(Expression<Func<T,object>> inField,PkType primaryKeyValue);
|
||||||
IDeleteable<T> In<PkType>(Expression<Func<T, object>> inField,PkType[] primaryKeyValues);
|
IDeleteable<T> In<PkType>(Expression<Func<T, object>> inField,PkType[] primaryKeyValues);
|
||||||
IDeleteable<T> In<PkType>(Expression<Func<T, object>> inField,List<PkType> primaryKeyValues);
|
IDeleteable<T> In<PkType>(Expression<Func<T, object>> inField,List<PkType> primaryKeyValues);
|
||||||
|
IDeleteable<T> In<PkType>(Expression<Func<T, object>> inField, ISugarQueryable<PkType> childQueryExpression);
|
||||||
|
|
||||||
IDeleteable<T> In<PkType>(string inField, List<PkType> primaryKeyValues);
|
IDeleteable<T> In<PkType>(string inField, List<PkType> primaryKeyValues);
|
||||||
IDeleteable<T> Where(string whereString,object parameters=null);
|
IDeleteable<T> Where(string whereString,object parameters=null);
|
||||||
IDeleteable<T> Where(string whereString, SugarParameter parameter);
|
IDeleteable<T> Where(string whereString, SugarParameter parameter);
|
||||||
|
Reference in New Issue
Block a user