Beispiel #1
0
        public ActionResult ShowAdvertisements(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }

            var advertisements = _repo.GetAdvertisementsByCategories((int)id).ToList();

            return(RedirectToAction("Index", "Advertisements", advertisements));
        }