Ejemplo n.º 1
0
        protected virtual void EnsureIsLoaded()
        {
            if (_list == null)
            {
                if (_totalCount == null)
                {
                    _totalCount = SourceQuery.Count();
                }

                if (_queryIsPagedAlready)
                {
                    _list = SourceQuery.ToList();
                }
                else
                {
                    _list = ApplyPaging().ToList();
                }
            }
        }
Ejemplo n.º 2
0
        private void EnsureIsLoaded()
        {
            if (_list == null)
            {
                if (_totalCount == null)
                {
                    _totalCount = SourceQuery.Count();
                }

                if (_queryIsPagedAlready)
                {
                    _list = SourceQuery.ToList();
                }
                else
                {
                    _list = ApplyPaging(SourceQuery).ToList();
                }
            }
        }
Ejemplo n.º 3
0
        private async Task EnsureIsLoadedAsync()
        {
            if (_list == null)
            {
                if (_totalCount == null)
                {
                    _totalCount = SourceQuery.Count();
                }

                if (_queryIsPagedAlready)
                {
                    _list = await SourceQuery.ToListAsync();
                }
                else
                {
                    _list = await ApplyPaging(SourceQuery).ToListAsync();
                }
            }
        }