public IActionResult GetAdsDefaultOrder() { var order = OrderAdBy.TimeDesc; var ads = _adService.Get(order); return(Ok(ads)); }
public IActionResult Ads() { var vm = new AdsViewModel { FilterAds = new FilterAds(), Ads = _adService.Get(), Categories = _categoryService.GetCategories() }; return(View(vm)); }
public ActionResult <IEnumerable <AdResponse> > Get() { var ads = _service.Get(); if (ads.Count() < 1) { return(NotFound()); } return(Ok(ads)); }
public Ad Load(int?ID) { return(ID.HasValue ? new Ad(_adService.Get(ID.Value)) : new Ad()); }
public PagingResponse <AdResponse> Get([FromQuery] SieveModel sieveModel) { return(_adService.Get <AdResponse>(sieveModel)); }