private void DeletePhoto(DeletePhotoMessage message) { var result = MessageBox.Show("Naozaj chcete vymazať túto fotku ?", "Vymazanie fotky", MessageBoxButton.YesNo, MessageBoxImage.Question); if (result == MessageBoxResult.No) { return; } _photoRepository.Delete(message.PhotoId); var photo = Photos.FirstOrDefault(r => r.Id == message.PhotoId); if (photo != null) { Photos.Remove(photo); } }
public void reload(DeletePhotoMessage m) { OnLoad(); }