// GET: Advertisers public ActionResult Index() { AdsRepository adrepo = new AdsRepository(); return(View(adrepo.GetAllAdvert())); }
////// GET: Ads/Details/5 //public ActionResult Details(int id) //{ // return View(); //} // GET: Ads/Create public ActionResult Create() { AdsRepository adrepo = new AdsRepository(); var advertisers = adrepo.GetAllAdvert(); Ads ad = new Ads(); ad.ListAdvertisers = advertisers.Select(x => new SelectListItem() { Text = x.AdName, Value = x.AdvertiserId.ToString(), }); return(View(ad)); }