public IActionResult DeleteEmployee(int id) { var cust = customerData.DeleteCustomer(id); if (cust == null) { return(Ok()); } return(NotFound()); }
public IActionResult Delete(string name) { var status = customers.DeleteCustomer(name); if (status) { return(Ok()); } else { return(NotFound("Sorry no such customer found")); } }
public bool DeleteCustomer(int id) { return(data.DeleteCustomer(id)); }
public IActionResult OnPost() { _customerData.DeleteCustomer(Customer.CustomerId); return(RedirectToPage("/Customers/Index")); }