コード例 #1
0
        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));
        }
コード例 #2
0
 public void DeleteCustomer(Customer c)
 {
     dal.DeleteCustomer(c);
 }