Пример #1
0
        public JsonResult Search()
        {
            var offers = _storage.Search("*:*");
            var viewModel = new OfferSearchViewModel();
            viewModel.Offers = new List<OfferViewModel>();

            Mapper.Map(offers, viewModel.Offers);

            return new JsonResult() { Data = viewModel };
        }
Пример #2
0
        public ActionResult Index()
        {
            var offers = _storage.Search("Hide:0");
            var viewModel = new OfferSearchViewModel();
            viewModel.Offers = new List<OfferViewModel>();

            Mapper.Map(offers, viewModel.Offers);

            return View(viewModel);
        }