title: How to setup this query using DbContext
body: <p>I have two tables in SQL server for customers and their addresses.</p>
  
  <pre><code>CREATE TABLE Customers
  (
      ID              INT NOT NULL IDENTITY(1,1),
      LastName        VARCHAR(50) NOT NULL,
      FirstName       VARCHAR(50) NOT NULL,
      DateOfBirth     DATETIME2 NOT NULL,
      CONSTRAINT [PK_Customers] PRIMARY KEY CLUSTERED ([ID] ASC)
  )
  CREATE TABLE CustomerAddresses
  (
      ID              INT NOT NULL IDENTITY(1,1),
      CustomerID      INT NOT NULL CONSTRAINT [FK_CustomerAddresses_Customers] FOREIGN KEY([CustomerID]) REFERENCES [dbo].[Customers] ([ID]),
      Street          VARCHAR(100) NOT NULL,
      City            VARCHAR(50) NOT NULL,
      Country         VARCHAR(50) NOT NULL,
      CONSTRAINT [PK_CustomerAddresses] PRIMARY KEY CLUSTERED ([ID] ASC)
  )
  </code></pre>
  
  <p>I have generated a EFdatamodel and connecting to it using DataContext. I am trying to get all customers for a particular country. My code is as follows.</p>
  
  <pre><code>static List&lt;Customer&gt; GetByCountry(string country)  
          {  
              MyDbContext MyContext = new MyDbContext ();  
              return MyContext.Customers.Where(x =&gt; x.CustomerAddresses.Where( y =&gt; y.Country == country)).ToList();  
          }  
  </code></pre>
  
  <p>But I am getting following compilation errors.</p>
  
  <blockquote>
    <p>Cannot implicitly convert type
    'System.Collections.Generic.IEnumerable' to
    'bool'     Cannot convert lambda expression to delegate type
    'System.Func' because some of the return
    types in the block are not implicitly convertible to the delegate
    return type</p>
  </blockquote>
  
  <p>What am I doing wrong here?</p>