public Observation GetByIdObserver(AuthUser authUser, string id) { var observation = _observationRepository.GetByIdObserver(authUser, id); //var observerObserved = _observationRepository.getObservedObserver(observation.ObservedId, observation.ObserverId); observation.TeacherObservationReport = _observationRepository.GetTeacherObservationReport(observation.CodAvaliacao, observation.ObservedId, observation.ObserverId); observation.Observer = _observationRepository.GetObserver(observation.ObserverId); observation.Observed = _observationRepository.GetObserved(observation.ObservedId); observation.FinalComments = _observationRepository.GetFinalComments(observation.CodAvaliacao, observation.ObservedId, observation.ObserverId); observation.Competences = _observationRepository.GetCompetences(observation.CodAvaliacao); observation.Escalas = _observationRepository.GetEscalaByAvaliacao(observation.CodAvaliacao); foreach (var item in observation.Competences) { item.Performances = _observationRepository.GetPerformances(observation.CodAvaliacao, observation.ObservedId, observation.ObserverId, item.Id); } return(observation); }