public ActionResult <Knight> Update(int id, [FromBody] Knight update) { try { update.Id = id; Knight updated = _service.Update(update); return(Ok(updated)); } catch (Exception e) { return(BadRequest(e.Message)); } }
public ActionResult <Knight> Update([FromBody] Knight edit, int id) { try { edit.Id = id; Knight update = _service.Update(edit); return(Ok(update)); } catch (Exception e) { return(BadRequest(e.Message)); } }