예제 #1
0
 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)));
     }
 }
예제 #2
0
        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));
            }
        }