public Ocorrencia ObterOcorrenciaCompletaPorId(long ocorrenciaId) { var ocorrencia = new Ocorrencia(); ocorrencia = _repositorio.ObterPorId(ocorrenciaId); if (ocorrencia != null) { ocorrencia.OcorrenciaTipo = _servicoOcorrenciaTipo.ObterPorId(ocorrencia.OcorrenciasTiposId); ocorrencia.StatusEntidade = _servicoStatusEntidade.ObterPorId(ocorrencia.StatusEntidadesId); if (!string.IsNullOrEmpty(ocorrencia.ResponsavelPorAspNetUserId)) { ocorrencia.Responsavel = _servicoUsuario.ObterPorUserId(ocorrencia.ResponsavelPorAspNetUserId); } } return(ocorrencia); }