public IHttpActionResult Insert(Invoice invoice) { try { ds.AddNew(invoice); return(Ok()); } catch (Exception ex) { return(InternalServerError()); } }
public ActionResult Insert(Invoice invoice) { ds.AddNew(invoice); return(new HttpStatusCodeResult(HttpStatusCode.OK)); // OK = 200 }