Exemplo n.º 1
0
        protected override ListViewModel <TEntity> ExecuteList(int CurrentPage)
        {
            var result = _services.All(CurrentPage, _pageSize);

            return(new ListViewModel <TEntity>
            {
                CurrentPage = CurrentPage,
                Items = result.PageOfResults.ToList(),
                PageSize = 20,
                TotalItems = result.TotalItems
            });
        }
Exemplo n.º 2
0
 protected virtual PagedResult <TEntity> GetData(int currentPage, int itemsByPage)
 {
     return(_service.All(currentPage, itemsByPage));
 }
Exemplo n.º 3
0
 public static IEnumerable <T> All <T>(this IServices container)
 {
     return(container.All(typeof(T)).OfType <T>());
 }