title: What is the best way to check if list contain any element of specific collection?
body: <p>What is the best way to get a list which only contains some data?</p>
  <p>My application is on ASP.NET CORE 5 Web API. It has <code>KitchenOrigin</code>s which each contain a collection of <code>Recipes</code>.</p>
  <pre><code>   public class KitchenOrigin
          {
              public int Id { get; set; }
              public string Name { get; set; }
              public string Code { get; set; }
              public ICollection&lt;Recipe&gt; Recipes { get; set; }
          }
      }
  </code></pre>
  <p>While my application is running, I'm seeding some data (<code>Recipes</code>).</p>
  <p><strong><code>KitchenOrigin</code>s are very many, so I would like to get only list of <code>KitchenOrigin</code>s that contains <code>Recipe</code>s.</strong></p>
  <p>Like in title: What is the best way of doing that?
  Maybe <code>IQueryable</code>? Could you help me with that?</p>
  <p>Here is my code:</p>
  <h3>Repo</h3>
  <pre><code> public async Task&lt;IEnumerable&lt;KitchenOrigin&gt;&gt; GetKitchenOriginsWithRecipesAsync()
          {
              return await _context.KitchenOrigins
              .Include(k =&gt; k.Recipes)
             .ToListAsync();
          }
  </code></pre>
  <h3>Controller</h3>
  <pre><code>[HttpGet(&quot;kitchen-origins&quot;)]
          public async Task&lt;ActionResult&gt; GetKitchenOrigins()
          {
              var kitchenOrigins = await _recipeRepository.GetKitchenOriginsWithRecipesAsync();
              return Ok(kitchenOrigins);
          }
  </code></pre>