public IActionResult DeleteEmployee(int id)
        {
            var cust = customerData.DeleteCustomer(id);

            if (cust == null)
            {
                return(Ok());
            }
            return(NotFound());
        }
Esempio n. 2
0
        public IActionResult Delete(string name)
        {
            var status = customers.DeleteCustomer(name);

            if (status)
            {
                return(Ok());
            }
            else
            {
                return(NotFound("Sorry no such customer found"));
            }
        }
Esempio n. 3
0
 public bool DeleteCustomer(int id)
 {
     return(data.DeleteCustomer(id));
 }
Esempio n. 4
0
 public IActionResult OnPost()
 {
     _customerData.DeleteCustomer(Customer.CustomerId);
     return(RedirectToPage("/Customers/Index"));
 }