Esempio n. 1
0
        public ActionResult <IEnumerable <ExperimentDto> > GetExperiments(Guid plantId)
        {
            var experimnts = _experimentRepository.GetExperiments(plantId);

            if (experimnts == null || experimnts.ToList().Count == 0)
            {
                return(NotFound());
            }

            var experimntsDto = _mapper.Map <IEnumerable <ExperimentDto> >(experimnts);

            return(Ok(experimntsDto));
        }