コード例 #1
0
 public async Task <IActionResult> Put([FromBody] RoomType roomType, [FromRoute] short id)
 {
     if (id != roomType.Id)
     {
         return(Conflict("Podane Id typów pokoi są różne"));
     }
     else
     {
         if (await _roomTypeService.Put(roomType, id))
         {
             return(NoContent());
         }
         else
         {
             return(NotFound());
         }
     }
 }