public async Task <IActionResult> UpdateOrigin(int id, Manifestoutgoing model) { try { return(Ok(await context.UpdateOrigin(id, model))); } catch (Exception ex) { return(BadRequest(new ErrorMessage(ex.Message))); } }
public async Task <IHttpActionResult> UpdateOrigin() { try { var result = await Request.Content.ReadAsStringAsync(); var manifest = JsonConvert.DeserializeObject <manifestoutgoing>(result); return(Ok(context.UpdateOrigin(manifest))); } catch (Exception ex) { return(Content(HttpStatusCode.NotAcceptable, ex.Message)); } }