コード例 #1
0
ファイル: WorkshopService.cs プロジェクト: paul-pagnan/helps
 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)));
        }