title: How can I search a right if it is in collection A and if isn't in collection B, with LINQ
body: <p>I need to search all rights which are in the roles.RolesWithRights collection  and are not in collection role.RolesWithRights, after this I should switch searches and delete rights which I found in roles.RolesWithRights and add in roles.RolesWithRights all find rights. </p>
  
  <p>I tried to do this with foreach() syntax, but I think with LINQ will be better, but I do not how. Can someone help me please. 
  Below is something what I tried.</p>
  
  <pre><code>foreach (RolesWithRights rights in role.RolesWithRights) {
      if (!roles.RolesWithRights.Any(y =&gt; y.ApplicationRightsId == rights.ApplicationRightsId)) {
          roles.RolesWithRights.Remove(rights);
      }
  }
  </code></pre>