public ActionResult Add() { AddAdvertisementVM model = new AddAdvertisementVM() { appUsers = _appUserService.GetActive(), Cities = _cityService.GetActive(), Districts = _districtService.GetActive(), Pettypes = _pettypeService.GetActive(), Races = _raceService.GetActive(), advertisements = _advertisementService.GetActive(), }; return(View(model)); }
// GET: Admin/Home public ActionResult Index() { AdvertisementService _advertisementService = new AdvertisementService(); var model = _advertisementService.GetActive().OrderByDescending(x => x.CreatedDate).Take(5); return(View(model)); }