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); }
public int ExecuteCommand() { DeleteBuilder.EntityInfo = this.Context.EntityMaintenance.GetEntityInfo <T>(); string sql = DeleteBuilder.ToSqlString(); var paramters = DeleteBuilder.Parameters == null ? null : DeleteBuilder.Parameters.ToArray(); RestoreMapping(); AutoRemoveDataCache(); Before(sql); var result = Db.ExecuteCommand(sql, paramters); After(sql); return(result); }
public static DeleteBuilder GetDeleteBuilder(ConnectionConfig currentConnectionConfig) { DeleteBuilder result = CreateInstance <DeleteBuilder>(GetClassName(currentConnectionConfig.DbType.ToString(), "DeleteBuilder")); return(result); }