Ejemplo n.º 1
0
        public IHttpActionResult GetById(int id)
        {
            try
            {
                var invoice = _invoices.GetById(id);

                if (invoice == null)
                {
                    return(NotFound());
                }

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