private void DeleteMovieDetail(object obj) { var delete = _messageDialogService.Show( "Delete", $"Do you want to delete {EditDetailModel?.OriginalTitle}?", MessageDialogButtonConfiguration.YesNo, MessageDialogResult.No); if (delete == MessageDialogResult.No) { return; } var id = Guid.Parse(obj.ToString()); Messenger.Default.Send(WrapperMappers.GuidToMovieDeleteGuidWrapper(id)); _movieActorRepository.TryDeleteAllByMovieOrActorId(EditDetailModel.Id); _movieDirectorRepository.TryDeleteAllByMovieOrDirectorId(EditDetailModel.Id); EditDetailModel = null; }
private void DeletePerson(object x) { var delete = _messageDialogService.Show( "Delete", $"Do you want to delete {PersonEditDetail?.Name} {PersonEditDetail?.Surname}?", MessageDialogButtonConfiguration.YesNo, MessageDialogResult.No); if (delete == MessageDialogResult.No) { return; } var id = Guid.Parse(PersonEditDetail.Id.ToString()); Messenger.Default.Send(WrapperMappers.GuidToPersonDeleteGuidWrapper(id)); _moviesActorRepository.TryDeleteAllByMovieOrActorId(id); _moviesDirectorRepository.TryDeleteAllByMovieOrDirectorId(id); PersonEditDetail = null; }