public async Task <IActionResult> Create([FromBody] Reservation reservation) { await _context.Reservations.AddAsync(reservation); await _context.SaveChangesAsync(); return(CreatedAtRoute("GetReservation", new { id = reservation.Id }, reservation)); }
public async Task <IActionResult> Create([FromBody] Room room) { await _context.Rooms.AddAsync(room); await _context.SaveChangesAsync(); return(CreatedAtRoute("GetRoom", new { id = room.Id }, room)); }