Exemple #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())));
        }
Exemple #2
0
        protected ActionResult All()
        {
            var response = _service.All();

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

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