Exemple #1
0
        public async Task UpdateSingleSubscription(int subscriptionId)
        {
            var subscription = await _storageBroker.SelectAllSourceSubscriptions()
                               .Include(s => s.SourceType)
                               .FirstOrDefaultAsync(s => s.Id == subscriptionId);

            if (subscription == null)
            {
                _logger.LogError("Subscription with id {subscriptionId} is not found", subscriptionId);
                return;
            }

            await UpdateSubscriptionVacancies(subscription);
        }
 public Task <List <SourceSubscription> > GetSubscriptionsAsync()
 {
     return(TryCatch(async() =>
     {
         var subscriptions = _storageBroker.SelectAllSourceSubscriptions().IncludeAllProperties();
         return await subscriptions.ToListAsync();
     }));
 }