Esempio n. 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 Limit LimitBySilo(int idSilo)
 {
     return(_limitRepository.LimitBySilo(idSilo));
 }