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)); } }
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)); } }