コード例 #1
0
        public ActionResult Delete([FromRoute] int id)
        {
            try
            {
                if (_chinookSupervisor.GetInvoiceLineById(id) == null)
                {
                    return(NotFound());
                }

                if (_chinookSupervisor.DeleteInvoiceLine(id))
                {
                    return(Ok());
                }

                return(StatusCode(500));
            }
            catch (Exception ex)
            {
                return(StatusCode(500, ex));
            }
        }