protected JobAd CreateJobAd(JobPoster jobPoster, int index, Action <JobAd> initialiseJobAd) { var jobAd = new JobAd { PosterId = jobPoster.Id, Title = string.Format(TitleFormat, index), Description = new JobAdDescription { Content = string.Format(ContentFormat, index), }, }; if (initialiseJobAd != null) { initialiseJobAd(jobAd); } _jobAdsCommand.CreateJobAd(jobAd); _jobAdsCommand.OpenJobAd(jobAd); _jobAdSearchService.UpdateJobAd(jobAd.Id); return(jobAd); }
protected void IndexJobAd(JobAd jobAd) { _searchService.UpdateJobAd(jobAd.Id); }
public void Handle(JobAdOpened message) { _service.UpdateJobAd(message.JobAd); }