public async Task <bool> DeleteHotelRoom(int hotelId, int roomId) { HotelRoom hotelRoom = await GetHotelRoom(hotelId, roomId); if (hotelRoom == null) { return(false); } _context.Entry(hotelRoom).State = EntityState.Deleted; await _context.SaveChangesAsync(); return(true); }
public async Task <bool> DeleteRoom(int id) { Room room = await GetRoom(id); if (room == null) { return(false); } _context.Entry(room).State = EntityState.Deleted; await _context.SaveChangesAsync(); return(true); }