/// <summary> /// Gets entries for current page /// </summary> /// <param name="page">current page</param> /// <param name="user">user name</param> /// <returns></returns> public ActionResult GetPage(int page, string user = "******") { BlogManager db = new BlogManager(); IQueryable<Entry> items; EntryModel[] et; if (user == "all") { items = db.GetEntries(page); Entry[] entries = items.ToArray(); et = Mapper.Map<Entry[], EntryModel[]>(entries); } else { user = Server.UrlDecode(user); items = db.GetEntries(user, page); et = Mapper.Map<EntryModel[]>(items.ToArray()); } ViewBag.Items = et; return View(et); }