private async void OnSaveExecute() { await _friendDataService.SaveAsync(Friend.Model); _eventAggregator.GetEvent <AfterFriendSavedEvent>().Publish(new AfterFriendSavedEventArgs { Id = Friend.Id, DisplayMember = $"{Friend.FirstName} {Friend.LastName}" }); }
private void SaveObject() { result = MessageBox.Show("You sure you want to edit?", "Confirmation", MessageBoxButton.YesNo, MessageBoxImage.Question); if (result == MessageBoxResult.Yes) { _friendDataService.SaveAsync(_selectedFriend); Load(); } }