public ActionResult IndexOLD(string id)
        {
            string uri;
            bool permalink = false;
            if (string.IsNullOrEmpty(id))
                uri = _baseUri;
            else
            {
                uri = postUri(id);
                permalink = true;
            }

            FeedQuery query = new FeedQuery();
            query.Uri = new Uri(uri);

            if (!permalink)
            {
                query.StartIndex = 0;
                query.NumberToRetrieve = 2;
            }

            AtomFeed feed = null;
            feed = _service.Query(query);

            var bpl = new List<BlogPost>();

            foreach (var e in feed.Entries)
            {
                var bp = new BlogPost()
                    {
                        Title = e.Title.Text,
                        Content = e.Content.Content,
                        Date = e.Published,
                        ID = e.EditUri.Content.Substring(e.EditUri.Content.LastIndexOf('/') + 1)
                    };
                bpl.Add(bp);
            }

            return View(new BlogListData()
                {
                    //SideBarData = new Models.Shared.MainSideBarData(),
                    Posts = bpl
                    //Posts = feed.Entries.Select(e => new BlogPost()
                    //{
                    //    Title = e.Title.Text,
                    //    Content = e.Content.Content,
                    //    Date = e.Published,
                    //    ID = Regex.Replace(e.Links.Single(l => l.Rel == "edit").HRef.ToString(), uri + "/", "")
                    //}).ToList()
                });
        }
        public JsonResult Items(int items, int startIndex)
        {
            FeedQuery query = new FeedQuery();
            query.Uri = new Uri(_baseUri);
            query.StartIndex = startIndex + 1; // Why do I have to plus 1 here? Is StartIndex not zero-based?
            query.NumberToRetrieve = items + 1;

            AtomFeed feed = null;
            feed = _service.Query(query);

            var bpl = new List<BlogPost>();
            bool moreAvailable = false;

            for (var i = 0; i < feed.Entries.Count; i++)
            {
                if (i == items)
                    moreAvailable = true;
                else
                {
                    var e = feed.Entries[i];
                    var bp = new BlogPost()
                    {
                        Title = e.Title.Text,
                        Content = e.Content.Content,
                        Date = e.Published,
                        ID = e.EditUri.Content.Substring(e.EditUri.Content.LastIndexOf('/') + 1),
                        FirstPost = (startIndex == 0 && i == 0)
                    };
                    bpl.Add(bp);
                }
            }

            return new JsonResult
            {
                Data = new
                {
                    Items = bpl.Count,
                    MoreAvailable = moreAvailable,
                    Last = bpl.Count > 0 ? Server.UrlEncode(bpl.Max(b => b.Date).ToString("yyyy/MM/dd HH:mm:ss")) : null,
                    Html = this.RenderPartialView(
                        "Blog/BlogPostList",
                        new BlogListData()
                        {
                            Posts = bpl
                        })
                },
                JsonRequestBehavior = JsonRequestBehavior.AllowGet,
                ContentType = "application/json; charset=utf-8"
            };
        }