Ejemplo n.º 1
0
 /// <summary>
 /// BrinquedoQuery
 /// </summary>
 /// <param name="brinquedoBusiness"></param>
 public BrinquedoQuery(IBrinquedoBusiness brinquedoBusiness)
 {
     Field <ListGraphType <BrinquedoType> >(
         "brinquedos",
         resolve: context => brinquedoBusiness.GetAll()
         );
 }
Ejemplo n.º 2
0
        public ActionResult <PagedResponse <List <Brinquedo> > > GetBrinquedo([FromQuery] PaginationFilter filter)
        {
            var route      = Request.Path.Value;
            int countPages = 0;
            var pagedData  = _brinquedoBusiness.GetAll(filter, out countPages).ToList();
            PagedResponse <List <Brinquedo> > pagedReponse = PaginationHelper.CreatePagedReponse(pagedData, filter, countPages, _uriService, route);

            return(Ok(pagedReponse));
        }