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));
        }
Esempio n. 2
0
 public void DeleteCustomer(Customer c)
 {
     dal.DeleteCustomer(c);
 }