Beispiel #1
0
 public ActionResult <Shoe> Put(string id, [FromBody] Shoe editShoe)
 {
     try
     {
         editShoe.Id = id;
         return(Ok(_ss.Edit(editShoe)));
     }
     catch (Exception e)
     {
         return(BadRequest(e.Message));
     }
 }
 public ActionResult <Shoe> Update(int id, [FromBody] Shoe updatedShoe)
 {
     try
     {
         updatedShoe.Id = id;
         return(Ok(_ss.Edit(updatedShoe)));
     }
     catch (Exception e)
     {
         return(BadRequest(e.Message));
     }
 }
 public ActionResult <Shoe> Edit([FromBody] Shoe newShoe, string id)
 {
     try
     {
         newShoe.Id = id;
         return(Ok(_ss.Edit(newShoe)));
     }
     catch (Exception e)
     {
         return(BadRequest(e.Message));
     }
 }