public IEnumerable <PessoaModelo> SelecionarPorId(int id, string nome) { if (id > 0 || nome != null) { return(_pessoaRepositorio.SelecionarPorId(id, nome)); } else { return(default(IEnumerable <PessoaModelo>)); } }
public IHttpActionResult Get(int id) { if (_repositorioPessoa.SelecionarPorId(id) != 0) { Pessoa _pessoa = _repositorioPessoa.pessoa; PessoaDTO _pessoaDTO = AutoMapperManager.Instance.Mapper.Map <Pessoa, PessoaDTO>(_pessoa); return(Ok(_pessoaDTO)); } return(NotFound()); //Request.CreateResponse(HttpStatusCode.NotFound); }