Exemplo n.º 1
0
        public async Task <IEnumerable <ItemComponentViewModel> > GetBySearch(ItemComponentRequest request)
        {
            var parameters = new Dictionary <string, object>
            {
                { "rubro_c_yid", request.itemComponentId }
            };

            var result = await _iGenericQuery.SearchAsync(@"dbo.ADV_T_RUBRO_search", ConvertTo.Xml(parameters), request.pagination);

            var items = result.Select(item => (ItemComponentViewModel)_iItemComponentMapper.MapToItemComponentViewModel(item));

            return(items);
        }
Exemplo n.º 2
0
        public async Task <IActionResult> GetByFindAll([FromQuery] ItemComponentRequest request)
        {
            var result = await _iItemComponentQuery.GetByFindAll(request);

            return(Ok(result));
        }
Exemplo n.º 3
0
        public async Task <PaginationViewModel <ItemComponentViewModel> > GetByFindAll(ItemComponentRequest request)
        {
            var parameters = new Dictionary <string, object>
            {
                { "rubro_c_yid", request.itemComponentId }
            };

            var result = await _iGenericQuery.FindAllAsync(@"dbo.ADV_T_RUBRO_find_all", ConvertTo.Xml(parameters), request.pagination);

            var items = result.Select(item => (ItemComponentViewModel)_iItemComponentMapper.MapToItemComponentViewModel(item));

            return(new PaginationViewModel <ItemComponentViewModel>(request.pagination, items));
        }