public void Delete(bool deleteFiles) { FavoriteManager.Delete(Favorite); FavoriteManager.Save(); var parent = Parent as TreeViewItem; if (parent != null) { parent.Items.Remove(this); } }
public ActionResult RemoveFavorite(Favorite item) { var fvrManager = new FavoriteManager(); var user = GetUserByLogin(); fvrManager.Delete(item.Id, user.Id); return View(); }