Example #1
0
 public ActionResult <Brick> Put(int id, [FromBody] Brick data)
 {
     try
     {
         data.Id = id;
         return(Ok(_br.Update(data)));
     }
     catch (Exception e)
     {
         return(BadRequest(e));
     }
 }
Example #2
0
 public ActionResult <Brick> Put(int id, [FromBody] Brick value)
 {
     try
     {
         value.Id = id;
         return(Ok(_repo.Update(value)));
     }
     catch (Exception e)
     {
         return(BadRequest(e));
     }
 }