title: Merge two list and Subtract the values of List B From List A
body: <p>I have the following lists and I want to subtract the property <code>Count</code> of list <code>B</code> from list <code>A</code></p>
  
  <p>Here are sample lists. Note that i've actually using Linq-To-Entities:</p>
  
  <p><strong>List A</strong>  </p>
  
  <pre><code>List&lt;Leave&gt; defaultLeaves = new List&lt;Leave&gt;()
  {
    new Leave{ Id = 1 , Count = 7},
    new Leave{ Id = 2 , Count = 7},
    new Leave{ Id = 3 , Count = 7},
    new Leave{ Id = 4 , Count = 3}
  };
  </code></pre>
  
  <p><strong>List B</strong></p>
  
  <pre><code>List&lt;Leave&gt; usedLeaves = new List&lt;Leave&gt;()
   {
      new Leave{ Id = 1 , Count = 1},
      new Leave{ Id = 2 , Count = 2}        
    };
  </code></pre>
  
  <p>I want to have the output of the list to be like this by subtracting the count from list <code>A</code> using the count of list <code>B</code> by respective <code>Ids</code></p>
  
  <pre><code>List&lt;Leave&gt; availableLeaves = new List&lt;Leave&gt;()
  {
    new Leave{ Id = 1 , Count = 6},
    new Leave{ Id = 2 , Count = 5},
    new Leave{ Id = 3 , Count = 7},
    new Leave{ Id = 4 , Count = 3}
   };
  </code></pre>
  
  <p>is this possible using linq method???</p>