コード例 #1
0
 public ActionResult <Board> editBoards(string boardId, Board editBoards)
 {
     try
     {
         editBoards.boardId = boardId;
         return(Ok(_service.Edit(editBoards)));
     }
     catch (System.Exception err)
     {
         return(BadRequest(err.Message));
     }
 }
コード例 #2
0
 public ActionResult <Board> EditBoard([FromBody] Board updated, int id)
 {
     try
     {
         updated.Id = id;
         return(Ok(_service.Edit(updated)));
     }
     catch (Exception e)
     {
         return(BadRequest(e.Message));
     }
 }