Пример #1
0
        public IHttpActionResult Create([FromBody] InvoiceModel invoice)
        {
            if (invoice == null)
            {
                return(BadRequest());
            }

            try
            {
                _invoices.Create(invoice);
                return(Ok());
            }
            catch (Exception ex)
            {
                return(BadRequest(ex.Message));
            }
        }