private async void Remove(object id) { int DestinationsID = int.Parse(id.ToString()); Response response = Task.FromResult <Response>(await DestinationRepository.RemoveDestination(DestinationsID)).Result; if (response.Success == true) { Messenger.Default.Send <Dialog>(new Dialog() { Message = "Bestemming verwijderd", Ok = "Ok", Nok = null, ViewOk = null, ViewNok = null, ParamView = false, Cb = null }); Loaded(); } else { //error } }
public async Task RemoveDestination(Destination d) { await _repository.RemoveDestination(d); }