コード例 #1
0
 public ActionResult <Brick> Edit([FromBody] Brick update, int id)
 {
     try
     {
         update.Id = id;
         return(Ok(_bs.Edit(update)));
     }
     catch (Exception e)
     {
         return(BadRequest(e.Message));
     }
 }
コード例 #2
0
 public ActionResult <Brick> Edit([FromBody] Brick newBrick, int id)
 {
     try
     {
         newBrick.Id = id;
         return(Ok(_service.Edit(newBrick)));
     }
     catch (Exception e)
     {
         return(BadRequest(e.Message));
     }
 }