public async Task <IActionResult> GetAll([FromQuery] bool?hasTemplate, [FromQuery] int?operacaoId) { var collection = await _eventoService.GetAll(hasTemplate, operacaoId); var response = new GetAllEventoResponse() { Data = collection.ConvertEntityToSchema <EventoSchema>().OrderBy(x => x.Nome) }; return(Ok(response)); }
public IActionResult Get() { try { var eventos = eventoService.GetAll(); return(Ok(eventos)); } catch (Exception) { throw; } }
public ActionResult <IEnumerable <string> > Get() { try { var Registros = _eventoService.GetAll(); return(new OkObjectResult(Registros)); } catch (ArgumentNullException e) { return(NotFound(e.Message)); } catch (Exception e) { return(BadRequest(e.Message)); } }
public IEnumerable <Evento> GetAll() { return(_eventoService.GetAll()); }