public ActionResult <IEnumerable <EnvironmentDTO> > GetEnvironments() { IList <Infra.Entidades.Environment> environments = _service.ConsultAllEnvironments(); if (environments.Count() < 0) { return(NotFound()); } else { return(Ok(environments.Select(x => _mapper.Map <EnvironmentDTO>(x)).ToList())); } }
public ActionResult <IEnumerable <EnvironmentDTO> > GetEnvironments() { var environments = _service.ConsultAllEnvironments(); if (environments == null) { return(NotFound()); } else { return(Ok(environments. Select(x => _mapper.Map <EnvironmentDTO>(x)). ToList())); } }
public ActionResult <IEnumerable <EnvironmentViewModel> > GetEnvironments() { var environments = _service.ConsultAllEnvironments(); if (environments == null) { return(NotFound()); } else { List <EnvironmentViewModel> teste = environments. Select(x => _mapper.Map <EnvironmentViewModel>(x)). ToList(); return(Ok(teste)); } }