Esempio n. 1
0
        private void ViewJobAd(IJobAd jobAd, DateTime time)
        {
            var viewing = new JobAdViewing
            {
                Id       = Guid.NewGuid(),
                ViewerId = Guid.NewGuid(),
                JobAdId  = jobAd.Id,
                Time     = time
            };

            _jobAdViewsRepository.CreateJobAdViewing(viewing);
        }
Esempio n. 2
0
        void IJobAdViewsCommand.ViewJobAd(Guid?viewerId, Guid jobAdId)
        {
            var viewing = new JobAdViewing
            {
                ViewerId = viewerId,
                JobAdId  = jobAdId
            };

            viewing.Prepare();
            viewing.Validate();
            _repository.CreateJobAdViewing(viewing);
        }