private void Remove(IReadOnlyCollection <Bookmark> toList) { var bookmarksSettings = new List <BookmarkSettings>(); foreach (var bookmark in toList) { if (_bookmarks.TryGetValue(bookmark, out var settings)) { bookmarksSettings.Add(settings); _bookmarks.Remove(bookmark); } } _settings.Remove(bookmarksSettings); Update(); }
public ActionResult RemoveBookmarks(BookmarkRemoveModel model) { bookmarks.Remove(model); return(Ok()); }