public IActionResult Delete(int id) { var model = new ProductViewModel(); model.Delete(id); return(RedirectToAction("Index")); }
public ActionResult Delete(int?id) { bool result = false; if (id.HasValue) { ProductViewModel model = ProductViewModel.ExecuteCreate(id.Value); if (model != null) { model.Delete(); result = true; } } return(Json(new { Success = result }, JsonRequestBehavior.AllowGet)); }
private void BtnDelete_Click(object sender, RoutedEventArgs e) { vm.Delete(); }
private void DeleteButton_Click(object sender, RoutedEventArgs e) { _viewModel.Delete(); }
public void Execute(object parameter) { viewModel.Delete(); }