Exemple #1
0
        public async Task RemoveSelected()
        {
            await _service.Delete(SelectedItem.Id);

            SelectedItem = null;
            await UpdateList();
        }
Exemple #2
0
        async void Delete()
        {
            await _pilotService.Delete(Pilot.Id);

            Pilot = new Pilot();
            await LoadPilots().ConfigureAwait(false);
        }
Exemple #3
0
        async void Delete()
        {
            await Pilotservice.Delete(Pilot.Id);

            Pilot = new Pilot();
            await LoadEntity().ConfigureAwait(false);
        }
Exemple #4
0
        public async Task DeleteUnExistingEntityReturnsFalse()
        {
            var pilotService = new PilotService(_unitOfWork, _mapper);

            var result = await pilotService.Delete(NotExistingPilotId);

            Assert.IsFalse(result);
        }
Exemple #5
0
        public async Task DeleteReturnsTrue()
        {
            var pilotService = new PilotService(_unitOfWork, _mapper);

            var result = await pilotService.Delete(1);

            Assert.IsTrue(result);
        }
Exemple #6
0
        public void Create_Pilot_When_get_Then_find()
        {
            var pilotService = new PilotService(unitOfWork, mapper, new PilotValidator());
            var id           = pilotService.Create(new BSA2018_Hometask4.Shared.DTO.PilotDto
            {
                Birthday   = DateTime.Now.AddYears(-30),
                Experience = 3,
                FirstName  = "Oleksii",
                LastName   = "Bogdanovych"
            });

            Assert.AreEqual(id, pilotService.Get(id).ID);
            pilotService.Delete(id);
        }
        public async Task Delete()
        {
            await PilotService.Delete(Pilot.Id);

            Pilot = new Pilot();
            NotifyPropertyChanged(() => Pilot);
            List <Pilot> tempPilots = await PilotService.GetAll();

            Pilots = new ObservableCollection <Pilot>();
            foreach (var fl in tempPilots)
            {
                Pilots.Add(fl);
            }
            NotifyPropertyChanged(() => Pilots);
        }
        private async void Delete(object sender, RoutedEventArgs e)
        {
            await _pilotService.Delete(PilotData);

            this.Frame.Navigate(typeof(PilotsPage));
        }
        public async Task DeleteById(int id)
        {
            await ps.Delete(id);

            this.Frame.Navigate(typeof(Pilots));
        }