public IHttpActionResult Delete(string customerCode) { int result = 0; try { if (ModelState.IsValid) { result = dalObject.DeleteCustomer(customerCode); return(Ok(result)); } } catch (Exception ex) { return(InternalServerError(ex)); } return(BadRequest(ModelState)); }
public void DeleteCustomer(Customer c) { dal.DeleteCustomer(c); }