private ICommand CreateAddWishListCommand(PurchaseBookService purchaseService, IWishListRepository wishListRepository) { return(new Command( execute: async() => { IsBusy = true; try { m_canAddToWishList = false; ChangeCanCommandExecute(AddWishList); await wishListRepository.AddAsync(m_book); } catch (Exception ex) { m_canAddToWishList = true; ChangeCanCommandExecute(AddWishList); m_messaging.Send(this, ex); } IsBusy = false; }, canExecute: () => { return m_canAddToWishList; })); }