public ActionResult Blogs(int uId = 0, int page = 1)
        {
            var currentUser = _userService.GetUserEntity(User.Identity.Name);
            int userId = (uId == 0) ? currentUser.Id : uId;
            var blogs = _blogService
                .GetAllBlogEntities()
                .Where(b => b.UserId == userId)
                .ToList();

            var models = blogs
                .Skip((page - 1) * 10)
                .Take(10)
                .Select(bl => bl.ToMvcBlog())
                .ToList();

            foreach (var m in models)
            {
                m.ArticleCount = _articleService
                    .GetAllArticleEntities(m.Id)
                    .Count();
            }
            PageInfo pageInfo = new PageInfo { PageNumber = page, PageSize = 10, TotalItems = blogs.Count() };
            var bvm = new BlogsViewModel { PageInfo = pageInfo, BlogViewModels = models };
            bvm.UserId = userId;

            return View(bvm);
        }
        public ActionResult Blogs(string blogTitle,int page = 1, int codeSort = 0)
        {
            var blogs = _blogService
                .GetAllBlogEntities()
                .Where(b => b.Name == blogTitle)
                .ToList();

            var models = blogs
                .Skip((page - 1) * 10)
                .Take(10)
                .Select(bl => bl.ToMvcBlog())
                .ToList();
            #region заполнить имена авторов
            foreach (var m in models)
            {
                var uId = _blogService.GetBlogEntity(m.Id).UserId;
                m.ArticleCount = _articleService.GetAllArticleEntities(m.Id).Count();
                m.UserName = _userService.GetUserEntity(uId).UserName;
            }
            #endregion

            string infoForGlyphicons;
            var comparer = BlogSorts.GetMethod(codeSort, out infoForGlyphicons);
            if (comparer != null)
                models.Sort(comparer);

            ViewBag.Direction = infoForGlyphicons;

            PageInfo pageInfo = new PageInfo { PageNumber = page, PageSize = 10, TotalItems = blogs.Count() };
            var bvm = new BlogsViewModel { PageInfo = pageInfo, BlogViewModels = models };
            ViewBag.blogTitle = blogTitle;
            
            return View(bvm);
        }