Exemplo n.º 1
0
        protected ActionResult Get(int?page = null, int?perPage = null, object filter = null)
        {
            if (page.HasValue || perPage.HasValue)
            {
                var response = Service.Search(new RequestModel <TF>(page, perPage, (TF)filter));
                return(Ok(MapperHelper.Map <ResponseModel <T>, ResponseModel <TLm> >(response)));
            }

            return(Ok(MapperHelper.CopyList <T, TLm>(Service.All())));
        }
Exemplo n.º 2
0
        protected ActionResult All()
        {
            var response = _service.All();

            return(Ok(MapperHelper.CopyList <T, Td>(response)));
        }
Exemplo n.º 3
0
        protected ActionResult BuscarTodos()
        {
            var resposta = Servico.Todos();

            return(Ok(MapperHelper.CopyList <T, TM>(resposta)));
        }