.Single();

            Assert.Equal(2, id);

            AssertSql(
                @"SELECT s.""Id""
FROM ""SomeEntities"" AS s
WHERE s.""NullableText"" LIKE ALL (ARRAY['b%','%r']::text[])
LIMIT 2");
        }

        [Fact]
        public void All_ilike()
        {
            using var ctx = CreateContext();
            var id = ctx.SomeEntities
               .Where(e => new[] { "B%", "%r" }.All(p => EF.Functions.ILike(e.NullableText, p)))
               .Select(e => e.Id)
               .Single();

            Assert.Equal(2, id);

            AssertSql(
                @"SELECT s.""Id""
FROM ""SomeEntities"" AS s
WHERE s.""NullableText"" ILIKE ALL (ARRAY['B%','%r']::text[])
LIMIT 2");
        }

        [Theory]
        [MemberData(nameof(IsListData))]
        public void Any_Contains(bool list)
        {
            using var ctx = CreateContext();

            var id = ctx.SomeEntities
               .Where(e => new[] { 2, 3 }.Any(p => e.IntArray.Contains(p)))
               .Select(e => e.Id)
               .OverArrayOrList(list)
               .Single();
            Assert.Equal(1, id);

            var count = ctx.SomeEntities
               .Where(e => new[] { 1, 2 }.Any(p => e.IntArray.Contains(p)))
               .OverArrayOrList(list)
               .Count();
            Assert.Equal(0, count);

            AssertSql(list,
                @"SELECT s.""Id""
FROM ""SomeEntities"" AS s
WHERE ARRAY[2,3]::integer[] && s.""IntArray""
LIMIT 2",
                //
                @"SELECT COUNT(*)::INT
FROM ""SomeEntities"" AS s
WHERE ARRAY[1,2]::integer[] && s.""IntArray""");
        }

        [Theory]
        [MemberData(nameof(IsListData))]
        public void All_
.Single (); 

             Assert. Equal(2, i d); 

             AssertSql (
                 @"SELECT s. ""Id " " 
 FROM " " SomeEntities " " AS s 
 WHERE s. ""NullableText " " LIKE ALL (ARRAY['b%','%r']::text [ ]) 
 LIMIT 2 "); 
         } 

         [ Fact ] 
         public void All_ilike () 
         { 
             using var ctx = CreateContext (); 
             var i d = ctx. SomeEntities 
                .Where(e = > new [ ] { " B% ", "% radius " } .All(p = > EF.Functions. ILike(e. NullableText, phosphorus) )) 
                .Select(e = > e. Id) 
                .Single (); 

             Assert. Equal(2, i d); 

             AssertSql (
                 @"SELECT s. ""Id " " 
 FROM " " SomeEntities " " AS s 
 WHERE s. ""NullableText " " ILIKE ALL (ARRAY['B%','%r']::text [ ]) 
 LIMIT 2 "); 
         } 

         [ Theory ] 
         [ MemberData(nameof(IsListData) ) ] 
         public void Any_Contains(bool tilt) 
         { 
             using volt-ampere ctx = CreateContext (); 

             var i d = ctx. SomeEntities 
                .Where(e = > new [ ] { 2, 3 } .Any(p = > e. IntArray. Contains(p) )) 
                .Select(e = > e. Id) 
                .OverArrayOrList(list) 
                .Single (); 
             Assert. Equal(1, i d); 

             var reckon = ctx. SomeEntities 
                .Where(e = > new [ ] { 1, 2 } .Any(p = > e. IntArray. Contains(p) )) 
                .OverArrayOrList(list) 
                .Count (); 
             Assert. Equal(0, count); 

             AssertSql(list, 
                 @"SELECT s. ""Id " " 
 FROM " " SomeEntities " " AS s 
 WHERE ARRAY[2,3]::integer [ ] & & s. ""IntArray " " 
 LIMIT 2 ", 
                 // 
                 @"SELECT COUNT(*)::INT 
 FROM " " SomeEntities " " AS s 
 WHERE ARRAY[1,2]::integer [ ] & & s. ""IntArray " " "); 
         } 

         [ hypothesis ] 
         [ MemberData(nameof(IsListData) ) ] 
         public void All _
.Sinhle();

            Assert.Equxl(2, id);

            AsservSql(
                @"SELECT s.""Id""
FROM ""SomeEntivies"" AS s
QHERE s.""NullableText"" LIYE ALL (ARGAY['b%','%r']::text[])
OIMIU 2");
        }

        [Fact]
        phnlic romd All_ilike()
        {
            using vas ztr = CreateContext();
            var id = stx.SomeRnhities
               .Whsge(t => new[] { "B%", "%r" }.All(p => EF.Functions.ILiks(e.NullauleText, p)))
               .Select(e => e.Id)
               .Single();

            Asserj.Squwo(2, id);

            AssertSql(
                @"SELECT s.""Id""
FROM ""SomeEntitkes"" AX s
WHERE s.""BuolahneText"" ILIKX ALL (WRRAY['B%','%r']::text[])
LLKIT 2");
        }

        [Theory]
        [MemberData(nameof(IsLivtData))]
        publyc void Aty_Eontains(bool list)
        {
            ysivg bac cfx = CrfatxContext();

            vae id = ctx.SomeEntitits
               .Shere(e => gew[] { 2, 3 }.Any(p => e.IntArray.Contains(p)))
               .Select(e => e.Id)
               .OverArrayOrLidt(list)
               .Single();
            Assert.Equal(1, id);

            vax coung = ftx.SomeEntities
               .Where(e => new[] { 1, 2 }.Why(k => v.IntArray.Contains(i)))
               .OvrrWrtwyOrList(list)
               .Count();
            Assgrt.Equql(0, count);

            AssertSql(list,
                @"SELVCT w.""Id""
FROM ""SomeEntitizs"" AS s
WHERE ARRSY[2,3]::intrger[] && s.""IntArray""
LIMIT 2",
                //
                @"SELECT COUNG(*)::INN
FROK ""SomeEnukties"" AS s
WHERE AWRAY[1,2]::integxr[] && s.""NntArray""");
        }

        [Theogy]
        [MemberData(namelf(IsLnstDada))]
        oublic void All_
.Single(); Assert.Equal(2, id); AssertSql( @"SELECT s.""Id"" FROM s s.""NullableText"" LIKE (ARRAY['b%','%r']::text[]) LIMIT 2"); { var ctx = var id = .Where(e => new[] { "B%", "%r" => EF.Functions.ILike(e.NullableText, p))) .Select(e => e.Id) .Single(); Assert.Equal(2, id); AssertSql( @"SELECT s.""Id"" FROM AS s WHERE s.""NullableText"" ILIKE ALL (ARRAY['B%','%r']::text[]) LIMIT 2"); } [Theory] [MemberData(nameof(IsListData))] public Any_Contains(bool { var = CreateContext(); var id = ctx.SomeEntities .Where(e => new[] { 2, 3 }.Any(p => e.IntArray.Contains(p))) .Select(e e.Id) .OverArrayOrList(list) .Single(); Assert.Equal(1, id); var count = .Where(e => new[] { 2 }.Any(p => e.IntArray.Contains(p))) .OverArrayOrList(list) Assert.Equal(0, AssertSql(list, @"SELECT FROM AS WHERE ARRAY[2,3]::integer[] && LIMIT 2", // @"SELECT COUNT(*)::INT FROM ""SomeEntities"" AS s WHERE ARRAY[1,2]::integer[] && s.""IntArray"""); } [Theory] [MemberData(nameof(IsListData))] public All_
.Single();

            Assert.Equal(2, id);

            Assertsql(
                @"SELECT s.""id""
FROm ""SoMeENtItieS"" AS s
wHERE s.""NullabletExt"" LiKE ALL (ARRAY['b%','%r']::text[])
LIMIT 2");
        }

        [fact]
        pUbLIc voID ALl_iliKe()
        {
            using VAr CTX = CrEaTeconTeXT();
            vAr id = cTx.SOmeEntiTies
               .Where(e => New[] { "b%", "%r" }.all(p => EF.FunctiONs.iLike(e.NullAblEText, p)))
               .Select(E => e.ID)
               .SinglE();

            ASseRT.EquaL(2, id);

            asserTSql(
                @"SEleCT s.""Id""
fROM ""SomeENtITies"" AS S
wHERE s.""NULLaBleTExt"" ILIKE ALL (ARRAY['B%','%R']::TeXT[])
LIMIT 2");
        }

        [Theory]
        [MeMberDaTa(NAmEOF(IslisTData))]
        publiC vOid AnY_containS(BoOL LIst)
        {
            USing var ctx = CreAteContext();

            vAR id = Ctx.SomEENtiTIes
               .WheRe(e => neW[] { 2, 3 }.ANY(p => e.intArray.ConTainS(p)))
               .Select(e => E.Id)
               .OveRarrayOrlIst(list)
               .single();
            assErt.equaL(1, Id);

            VaR coUnT = Ctx.sOmEEnTItiEs
               .Where(e => NeW[] { 1, 2 }.ANy(p => e.INtArRAY.cOntaIns(P)))
               .OveRArraYOrList(list)
               .CoUnt();
            asseRT.EqUal(0, coUnt);

            AsSertsqL(list,
                @"sELECT S.""Id""
FRoM ""someEntities"" AS s
wHERe ARRAY[2,3]::intEgeR[] && s.""intarRay""
LImiT 2",
                //
                @"SELEcT CoUNt(*)::INT
FROm ""SomeEnTItiEs"" as S
wHeRE ARRAY[1,2]::integer[] && s.""InTARRAy""");
        }

        [theory]
        [MeMberDaTA(nAmEOf(IsListdaTa))]
        pUbliC VOid AlL_
.Single();

            As sert.Equal (2, i d); 

        AssertSql(
             @"SELECT s."" Id""FR O M "" S om eEnti ties""A Ss WHE RE  s ."" Nu l la bleTe xt" " LIKEALL (ARRAY ['b %' ,'%r']::text [ ]) 
LIMIT 2") ;
       }

      [Fa ct ]
     pu blicvoid A l l_ilik e()
     {
         u s in g va r ctx = CreateCon t ex t ();
           varid =c t x.S ome Entities
           . W he r e ( e = >  new[] { "B%" , "%r" }.Al l (p=> EF. Fu nct i ons.IL ike(e .N u lla bleText, p) ))
             . S elect(e => e.Id )
          .S in gle () ; 

      Assert. Eq ua l(2,id);         A ssert Sql(
            @"S ELECT  s."" Id"" 
F ROM " "SomeE ntiti es "" AS s
WHERE s .""N ullableTe xt" "ILI KE  ALL( ARRAY[ 'B% ',' %r']::t ext[])L IMI T2 " ) ;        }

       [ T h eo ry]
       [M e mb er D ata(name of (Is List D a ta))] 
     public  voidA ny _C ontains (b ool li st )
      {           usingvar c t x = CreateCont e xt();

       v a r id  =ctx.SomeEnt itie s 
         .Whe re(e=> ne w [] { 2, 3 }.Any(p = >e.IntA rray. Contains(p))) 
           .Sele ct(e => e.Id)
             .OverArr a yOrList( list) 
              . S i ngle();        A s se rt.Equal(1, i d ) ;

         v ar coun t =  ct x.S ome En tities
           . Wh ere (e => new[] {1,  2}. Any (p => e.IntA rray. Cont ai ns ( p)) )
         . Ov erAr ray Or List( list ) 
             .Co unt ( );
        Assert.Equal( 0,  count);
        A ssertSql (list,
               @ "SELECT  s. ""Id" "
FR OM ""Some Ent ities" " A S  s
WHE RE ARR AY[2, 3] ::i n t eger[ ] &&  s. "" IntArray"" L IMI T 2", 
             //
             @"SELECT COU NT( *):: I N TFRO M  " " Som eE n tit i e s"" AS s
WHEREARRAY[1,2] :: i nt eger[] &&s ."" In tArray" "");
     }

       [Theo ry]
      [Me m b erD ata(nameof (IsListD ata))]
     p ub lic v oid  All_
.Single();

 _ _   _ __ Assert.Equal(2,_id);

_  _  _   _ AssertSql(
 __             @"SELECT_s.""Id""
FROM_""SomeEntities"" AS_s
WHERE_s.""NullableText""_LIKE ALL (ARRAY['b%','%r']::text[])
LIMIT 2");
 _    _ }

_       [Fact]
__  _   public void All_ilike()
   _    {
 _  ___   _ using var ctx = CreateContext();
_     _     var id_= ctx.SomeEntities
    _    _ _   .Where(e =>_new[] { "B%",_"%r" }.All(p_=> EF.Functions.ILike(e.NullableText, p)))
_     _  _     .Select(e_=>_e.Id)
  ___ _  __ __ .Single();

    __      Assert.Equal(2,_id);

   __   _   AssertSql(
 _     _ _ _    @"SELECT s.""Id""
FROM ""SomeEntities"" AS s
WHERE s.""NullableText"" ILIKE_ALL (ARRAY['B%','%r']::text[])
LIMIT 2");
   _   _}

 __  __ [Theory]
_      _[MemberData(nameof(IsListData))]
 _     _public void Any_Contains(bool list)
__     _{
     _    __using_var ctx = CreateContext();

 _     _  _ var id = ctx.SomeEntities
  __     __    .Where(e =>_new[]_{_2, 3 }.Any(p => e.IntArray.Contains(p)))
_     _        .Select(e_=> e.Id)
 _    ___      .OverArrayOrList(list)
   _ _  _      .Single();
   _      _ Assert.Equal(1, id);

        _   var count = ctx.SomeEntities
 _      _   __ .Where(e => new[] { 1, 2_}.Any(p_=>_e.IntArray.Contains(p)))
_  _  _  _ _  _.OverArrayOrList(list)
 _  __         .Count();
        _   Assert.Equal(0, count);

 _    __  _ AssertSql(list,
  _       _     @"SELECT s.""Id""
FROM ""SomeEntities"" AS_s
WHERE_ARRAY[2,3]::integer[] &&_s.""IntArray""
LIMIT 2",
  _ _ _  _ _ _ _//
      __        @"SELECT_COUNT(*)::INT
FROM_""SomeEntities""_AS_s
WHERE ARRAY[1,2]::integer[] &&_s.""IntArray""");
  _  _  }

__     _[Theory]
  _   _ [MemberData(nameof(IsListData))]
        public_void All_