Exemplo n.º 1
0
        public ICommandResult GetFiltro(TratamentoFiltro filtro)
        {
            try
            {
                var filtros = _experimentoRepository.Filtro(filtro.MountExpression(),
                                                            x => x.Nome.ToString(),
                                                            true,
                                                            out int totalRegistros,
                                                            string.Empty,
                                                            filtro.Offset,
                                                            filtro.Limit);

                return(new CommandResult(filtros, totalRegistros));
            }
            catch (Exception e)
            {
                return(new CommandResult(new { causa = e.Message }));
            }
        }
Exemplo n.º 2
0
        public async Task <IActionResult> Get([FromQuery] TratamentoFiltro filtro)
        {
            var result = _tratamentoOutputHandler.GetFiltro(filtro);

            return(await GetResponse(result, _tratamentoOutputHandler.Notifications));
        }