public async Task<ActionResult<AmenityDto>> PostAmenity(AmenityDto amenity)
    {
      Amenity newAmenity = await _amenity.Create(amenity);

      return CreatedAtAction("GetAmenity", new { id = amenity.ID }, amenity);
    }
Example #2
0
      public async Task <ActionResult <Amenity> > PostAmenity(Amenity amenity)
      {
          await _amenity.Create(amenity);

          return(CreatedAtAction("GetHotel", new { id = amenity.Id }, amenity));
      }
        public async Task <ActionResult <AmenityDTO> > PostAmenity(AmenityDTO amenity)
        {
            await _amenity.Create(amenity);

            return(CreatedAtAction("GetAmenity", new { id = amenity.ID }, amenity));
        }