title: Removing many to many entity Framework
body: <p>There is a many to many relationship between <code>Artist</code> and <code>ArtistType</code>. I can easily add artist <code>ArtistType</code> like below</p>
  
  <pre><code>foreach (var artistType in this._db.ArtistTypes
      .Where(artistType =&gt; vm.SelectedIds.Contains(artistType.ArtistTypeID)))
  {
      artist.ArtistTypes.Add(artistType);
  }
  
  _db.ArtistDetails.Add(artist);
  _db.SaveChanges();
  </code></pre>
  
  <p>This goes and updates the many to many association table with correct mapping. But when I try to remove any item from table I do not get any error but it does not remove it from the table? </p>
  
  <pre><code>foreach (var artistType in this._db.ArtistTypes
      .Where(at =&gt; vm.SelectedIds.Contains(at.ArtistTypeID)))
  {
      artistDetail.ArtistTypes.Remove(artistType);
  }
  
  this._db.Entry(artistDetail).State = EntityState.Modified;
  this._db.SaveChanges();
  </code></pre>
  
  <p>What am I missing?</p>