public void AddAdsPage(AdvertisementPageViewModel adsPage)
        {
            var advertisement = _advertisementRepository.FindById(adsPage.AdvertisementId);

            if (advertisement != null)
            {
                var adsPageModel = Mapper.Map <AdvertisementPageViewModel, AdvertisementPage>(adsPage);
                advertisement.AdvertisementPages.Add(adsPageModel);
            }
        }
        public void UpdateAdsPage(AdvertisementPageViewModel adsPage)
        {
            var adsPageModel = _advertisementPageRepository.FindById(adsPage.Id);

            if (adsPageModel != null)
            {
                adsPageModel.AdvertisementId         = adsPage.AdvertisementId;
                adsPageModel.AdvertisementPageNameId = adsPage.AdvertisementPageNameId;
                adsPageModel.Position = adsPage.Position;

                _advertisementPageRepository.Update(adsPageModel);
            }
        }