Exemple #1
0
        public List <MeasurementModel> GetAllModel()
        {
            List <MeasurementModel> lista = new List <MeasurementModel>();
            var measurs = _measurementRepository.GetLastMeasurement();

            foreach (var item in measurs)
            {
                MeasurementModel element = new MeasurementModel();
                element.Measurement = item;
                element.Silo        = _siloRepository.GetById(item.IdSilo);
                element.Limit       = _limitRepository.LimitBySilo(item.IdSilo);
                element.Block       = _blockRepository.BlockBySilo(item.IdSilo);
                lista.Add(element);
            }
            return(lista);
        }
 public IEnumerable <Measurement> GetLastMeasurement()
 {
     return(_measurementRepository.GetLastMeasurement());
 }