void IDataPager.LoadPage(DbAccessLayer dbAccess)
        {
            T[]        selectWhere = null;
            IDbCommand finalAppendCommand;

            if (AppendedComands.Any())
            {
                if (BaseQuery == null)
                {
                    BaseQuery = dbAccess.CreateSelect <T>();
                }

                finalAppendCommand = AppendedComands.Aggregate(BaseQuery,
                                                               (current, comand) => dbAccess.Database.MergeTextToParameters(current, comand, false, 1, true, false));
            }
            else
            {
                if (BaseQuery == null)
                {
                    BaseQuery = dbAccess.CreateSelect <T>();
                }

                finalAppendCommand = BaseQuery;
            }

            SyncHelper(CurrentPageItems.Clear);

            var pk = TargetType.GetPK(dbAccess.Config);

            var selectMaxCommand = dbAccess
                                   .Query()
                                   .WithCte("CTE", cte => new SelectQuery <T>(cte.QueryCommand(finalAppendCommand)))
                                   .QueryText("SELECT COUNT(*) FROM CTE")
                                   .ContainerObject
                                   .Compile();

            var maxItems = dbAccess.RunPrimetivSelect(typeof(long), selectMaxCommand).FirstOrDefault();

            if (maxItems != null)
            {
                long parsedCount;
                long.TryParse(maxItems.ToString(), out parsedCount);
                TotalItemCount = parsedCount;
                MaxPage        = (long)Math.Ceiling((decimal)parsedCount / PageSize);
            }

            RaiseNewPageLoading();
            IDbCommand command;

            command = dbAccess.Query()
                      .WithCte("CTE", cte => new SelectQuery <T>(cte.QueryCommand(finalAppendCommand)))
                      .QueryText("SELECT * FROM CTE")
                      .QueryD("ASC LIMIT @PageSize OFFSET @PagedRows", new
            {
                PagedRows = (CurrentPage - 1) * PageSize,
                PageSize
            })
                      .ContainerObject
                      .Compile();

            selectWhere = dbAccess.SelectNative(TargetType, command, true).Cast <T>().ToArray();

            foreach (T item in selectWhere)
            {
                var item1 = item;
                SyncHelper(() => CurrentPageItems.Add(item1));
            }

            if (CurrentPage > MaxPage)
            {
                CurrentPage = MaxPage;
            }

            RaiseNewPageLoaded();
        }