Ejemplo n.º 1
0
        private void BtnDelete_Click(object sender, RoutedEventArgs e)
        {
            int selectedId = (VehicleGrid.SelectedItem as CarVM).Id;
            var responce   = CarLogic.Delete(new CarVM
            {
                Id = selectedId,
            });

            if (responce.IsCompleted)
            {
                VehicleGrid.ItemsSource = CarLogic.List().Object;
            }
        }
Ejemplo n.º 2
0
        public async Task <IActionResult> Delete(int carId)
        {
            var isSuccess = await CarLogic.Delete(GetToken(), carId);

            return(Ok(isSuccess));
        }
Ejemplo n.º 3
0
 public IActionResult Delete(string id)
 {
     logic.Delete(id);
     return(RedirectToAction(nameof(Dashboard)));
 }