/// <summary> /// 通过模板产生一个参数化查询对象并串联到现有的参数化查询对象之后 /// </summary> /// <param name="firstQuery">需要被串联的参数化查询对象</param> /// <param name="templateText">SQL 命令模版</param> /// <param name="parameters">模版参数列表</param> /// <returns>串联后的参数化查询对象</returns> public static AsyncDbExecutableQuery <ParameterizedQuery> Concat(this AsyncDbExecutableQuery <ParameterizedQuery> firstQuery, string templateText, params object[] parameters) { return(Concat(firstQuery, Db.T(templateText, parameters))); }
/// <summary> /// 串联多个参数化查询对象 /// </summary> /// <param name="firstQuery">第一个参数化查询对象</param> /// <param name="otherQueries">要串联的其他参数化查询对象</param> /// <returns>串联后的参数化查询对象</returns> public static AsyncDbExecutableQuery <ParameterizedQuery> Concat(this AsyncDbExecutableQuery <ParameterizedQuery> firstQuery, params ParameterizedQuery[] otherQueries) { var query = Concat(firstQuery.Query, otherQueries); return(new AsyncDbExecutableQuery <ParameterizedQuery>(firstQuery.Executor, query)); }