Endelig fandt jeg unnest
funktion kan hjælpe.
Ren SQL er sådan:
select * from plat_customs_complex
where (code_t,code_s) = ANY(select * from unnest(ARRAY['01013090','01029010'],ARRAY['10','90']))
Kan nemt konvertere den til C#-kode:
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});