最後に、unnest
を見つけました 機能が役立ちます。
純粋なSQLはそのようなものです:
select * from plat_customs_complex
where (code_t,code_s) = ANY(select * from unnest(ARRAY['01013090','01029010'],ARRAY['10','90']))
簡単にC#コードに変換できます:
string[] codeTs = new string[]{"01013090","01029010"};
string[] codeSs = new string[]{"10", "90"};
connection.Query("select * from plat_customs_complex
where (code_t,code_s) = ANY(select * from unnest(@CodeTs, @CodeSs))",
new {CodeTs=codeTs, CodeSs=codeSs});