Пример #1
0
        private async void DeleteAeroplane()
        {
            try
            {
                await _service.DeleteAsync(SelectedAeroplane.Id);

                Aeroplanes.Remove(SelectedAeroplane);
            }
            catch (System.InvalidOperationException ex)
            {
                await _dialogService.ShowMessage(ex.Message, "Error");
            }
        }
        public async Task <Dictionary <MessageType, string> > DeleteAsync(int id, CancellationToken ct)
        {
            var aeroplane = await _aeroplaneServices.GetById(id, ct);

            return(await _aeroplaneServices.DeleteAsync(aeroplane, ct));
        }