コード例 #1
0
ファイル: Services.cs プロジェクト: GABAnich/HotelTelegramBot
        internal static async Task <Reservation> AddReservationAsync(long chatId, long hotelRoomTypeId, Reservation _r)
        {
            List <string> dates       = GetIntermediateDates(_r.DateOfArrival, _r.DateOfDeparture);
            long          hotelRoomId = GetHotelRoom(hotelRoomTypeId, dates).Id;

            _r.HotelRoomId = hotelRoomId;
            Reservation r = await ServicesReservation.AddReservationAsync(_r);

            await ServicesHotelRoomReservedDate.AddHotelRoomReservedDatesAsync(r.Id, dates);

            return(r);
        }