title: Remove item from collection entity framework
body: <p>I have a model called 'target' retreived by entityframework with a collection addresses.</p>
  
  <p>After removing all items that are not in excesting in another collection i'm saving my entity framework context.</p>
  
  <p>However, when checking my database the records are still there. While my linq code made sure to remove the items from the collection.</p>
  
  <p>Here is my linq code:</p>
  
  <pre><code>using (IUnitOfWork uow = _uow.CreateUnitOfWork())
  {
      var target = _repository.GetByBron(uow, bron.BronId);
      target.Adressen.RemoveAll(x =&gt; source.Adressen.All(y =&gt; !y.Equals(x)));
  
      //Which calls Context.SaveChanges(); inside the unit of work class
      uow.Save(_logger);
  }    
  </code></pre>
  
  <p><strong>Update</strong>: The problem is not removing my record from the collection. Its when i'm calling the save on the context. The relation record in my database is still there... nothing has been deleted... aldo it was removed from the collection.</p>
  
  <p><strong>Solved</strong>
  I'm directly removing it from the context now. (with a seperated repository object)</p>