public StatsLibaryViewModel PreparedPage(string userId)
        {
            var model       = new StatsLibaryViewModel();
            var returnModel = this.SearchStats(model, userId);

            return(returnModel);
        }
        public IActionResult StatsSearch(StatsLibaryViewModel model)
        {
            var startUp = this.StartUp();

            if (startUp != null)
            {
                return(startUp);
            }

            var returnModel = this.statsLibraryService.SearchStats(model, this.userId);

            this.ViewData["message"] = this.userId;
            return(this.View("Stats", returnModel));
        }
        public StatsLibaryViewModel SearchStats(StatsLibaryViewModel model, string userId)
        {
            model.Genres = this.GetGenre();
            var searchBook  = model.SearchBook;
            var returnModel = new StatsLibaryViewModel()
            {
                SearchBook = searchBook,
                Genres     = model.Genres,
                ChartGettenBookSinceSixМonth = this.ChartGettenBookSinceSixМonth(searchBook, userId),
                ChartAddedBookSinceSixМonth  = this.ChartAddedBookSinceSixМonth(searchBook, userId),
            };

            return(returnModel);
        }