private async Task <SourceEmployer> AddSourceEmployerAsync(SourceType sourceType, HeadHunterEmployer headHunterEmployer) { var employer = _storageBroker.SelectAllEmployers() .FirstOrDefault(item => item.Name.ToLower().Equals(headHunterEmployer.Name.ToLower())) ?? await AddEmployerAsync(headHunterEmployer); var sourceEmployer = new SourceEmployer { SourceId = headHunterEmployer.Id, EmployerId = employer.Id, SourceTypeId = sourceType.Id, Url = headHunterEmployer.Url }; sourceEmployer = await _storageBroker.InsertSourceEmployerAsync(sourceEmployer); return(sourceEmployer); }