コード例 #1
0
 private async Task <Employment> GetOrCreateEmploymentAsync(HeadHunterVacancy headHunterVacancy)
 {
     if (headHunterVacancy.Employment == null)
     {
         return(null);
     }
     return(_storageBroker.SelectAllEmployments().FirstOrDefault(e =>
                                                                 e.Code.ToLower().Equals(headHunterVacancy.Employment.Id.ToLower())) ??
            await AddEmploymentAsync(headHunterVacancy.Employment));
 }
コード例 #2
0
 public async Task <List <Employment> > GetEmploymentsAsync()
 {
     return(await _storageBroker.SelectAllEmployments().ToListAsync());
 }