public IDeleteable <T> Where(Expression <Func <T, bool> > expression) { var expResult = DeleteBuilder.GetExpressionValue(expression, ResolveExpressType.WhereSingle); var whereString = expResult.GetResultString(); if (expression.ToString().Contains("Subqueryable()")) { whereString = whereString.Replace(this.SqlBuilder.GetTranslationColumnName(expression.Parameters.First().Name) + ".", this.SqlBuilder.GetTranslationTableName(this.EntityInfo.DbTableName) + "."); } DeleteBuilder.WhereInfos.Add(whereString); return(this); }
public IDeleteable <T> In <PkType>(Expression <Func <T, object> > inField, List <PkType> primaryKeyValues) { var lamResult = DeleteBuilder.GetExpressionValue(inField, ResolveExpressType.FieldSingle); var fieldName = lamResult.GetResultString(); tempPrimaryKeys = new List <string>() { fieldName }; var result = In(primaryKeyValues); tempPrimaryKeys = null; return(this); }