Exemple #1
0
        public async Task <ActionResult> Index(string q, int?page, int?createdId)
        {
            var coupons = await _cs.Get(q);

            ViewBag.SearchQuery = q ?? string.Empty;
            ViewBag.CreatedId   = createdId;
            return(View(coupons.ToPagedList(page ?? 1, 20)));
        }