Ejemplo n.º 1
0
        public Task <PagedResult <WareHouseViewModel> > GetPaged(string name, string orderBy = "", bool orderAsc = true, int page = 1, int pageSize = 20)
        {
            var data   = _queries.GetPaged(name, orderBy, orderAsc, page, pageSize).Result;
            var result = new PagedResult <WareHouseViewModel>
            {
                CurrentPage = data.CurrentPage,
                PageCount   = data.PageCount,
                PageSize    = data.PageSize,
                RowCount    = data.RowCount,
                Results     = WareHouseViewMapper.DtoToViewModels(data.Results)
            };

            return(Task.FromResult(result));
        }
 public IEnumerable <WareHouseViewModel> Get()
 {
     return(WareHouseViewMapper.DtoToViewModels(_queries.Get().Result));
 }