I have tables A, B and C

B is related to A as many-to-one

I want to find all A where C is full subset of B.

Follwing LINQ query (pseudocode) is representing what I want to get.

```
class A
{
    public B[] Bs { get; set; }
}

class B
{
    public string Text { get; set; }
}

class C
{
    public string Text { get; set; }
}

private static IEnumerable<A> Search(C[] C, A[] A)
{
    return from a in A
            where C.All(c => a.Bs.Any(b => SomeCondition(b, c)))
            select a;
}

private static bool SomeCondition(B b, C c)
{
    //There we comparing B and C
    throw new NotImplementedException();
}

```

I have following table structure

```
A ( a_ID INT PRIMARY KEY )
B ( b_ID INT PRIMARY KEY, a_ID INT, Text NVARCHAR(MAX) )
C ( c_ID INT PRIMARY KEY, Text NVARCHAR(MAX) )

```

I need to get ALL A, where B matches all C.

Example

```
A | a_ID |
  | 1    |
  | 2    |
  | 3    |

B | b_ID | a_ID | Text  |
  | 1    | 1    | Cat   |
  | 2    | 1    | Dog   |
  | 3    | 1    | Rabbit| 
  | 4    | 2    | Cat   | 
  | 5    | 2    | Cat   | -- B can contain duplicates
  | 6    | 2    | Rabbit|

C | c_ID | Text |
  | 1    | Cat  |
  | 2    | Dog  |

```

Output

```
| a_ID |
| 1    |

```