public IHttpActionResult Put(int id, port value) { try { return(Ok(context.Put(id, value))); } catch (Exception ex) { return(Content(HttpStatusCode.NotModified, ex.Message)); } }
public async Task <IActionResult> Put(int id, Port value) { try { return(Ok(await context.Put(id, value))); } catch (Exception ex) { return(BadRequest(new ErrorMessage(ex.Message))); } }