Пример #1
0
        // Album page
        public ActionResult Account(int?page, string filter = null)
        {
            using (var client = new WebClient())
            {
                var     text = client.DownloadString("http://jsonplaceholder.typicode.com/posts/1");
                Details det  = JsonConvert.DeserializeObject <Details>(text);
            }
            var records = new List <ImagePostModel>();

            records        = galRepo.getAlbums(filter);
            ViewBag.filter = filter;
            if (records == null)
            {
                ViewBag.Empty = true;
                return(View());
            }
            else
            {
                int pageSize   = 10;
                int pageNumber = (page ?? 1);
                return(View(records.ToPagedList(pageNumber, pageSize)));
            }
        }