Пример #1
0
 public async Task <WorkshopBooking> GetBooking(CancellationToken ct, int workshopId, bool LocalOnly, bool ForceUpdate = false)
 {
     if (!LocalOnly && (workshopBookingTable.NeedsUpdating(workshopId) || ForceUpdate))
     {
         TestConnection();
         await BookingsService.UpdateBookings("workshop", true);
     }
     return(workshopBookingTable.GetByWorkshopId(workshopId));
 }
Пример #2
0
        public async Task <List <WorkshopPreview> > GetBookings(CancellationToken ct, bool Current, bool LocalOnly, bool ForceUpdate = false)
        {
            //TODO Introduce Pagination
            if (!LocalOnly && ((sessionBookingTable.NeedsUpdating(Current) || ForceUpdate)))
            {
                TestConnection();
                await BookingsService.UpdateBookings("session", Current);
            }

            return(await Translater.TranslatePreview(sessionBookingTable.GetAll(Current)));
        }