Ejemplo n.º 1
0
        public IEnumerable <Observation> GetAllByObserver(AuthUser authUser, int contextoAno)
        {
            var observations = _observationRepository.GetAllByObserver(authUser, contextoAno);

            var allByObserver = observations as Observation[] ?? observations.ToArray();

            foreach (var observation in allByObserver)
            {
                observation.Observer = _observationRepository.GetObserver(observation.ObserverId);
                observation.Observed = _observationRepository.GetObserved(observation.ObservedId);
            }

            return(allByObserver);
        }