Esempio n. 1
0
 public Task <SubscriptionVacancy> AddSubscriptionVacancyAsync(SubscriptionVacancy subscriptionVacancy)
 {
     return(TryCatch(async() =>
     {
         ValidateSubscriptionVacancyOnAdd(subscriptionVacancy);
         subscriptionVacancy.Id = 0;
         return await _storageBroker.InsertSubscriptionVacancyAsync(subscriptionVacancy);
     }));
 }
Esempio n. 2
0
        private async Task SaveSubscriptionVacancy(Vacancy vacancy, SourceSubscription subscription)
        {
            var subscriptionVacancy = new SubscriptionVacancy
            {
                SourceSubscriptionId = subscription.Id,
                VacancyId            = vacancy.Id
            };
            await _storageBroker.InsertSubscriptionVacancyAsync(subscriptionVacancy);

            _logger.Log(LogLevel.Information, "Saved subscription vacancy {VacancyId} for subscription {SubscriptionId}",
                        vacancy.Id, subscription.Id);
        }