Ejemplo n.º 1
0
        public void GetMeasuremetns()
        {
            var item = MeasurementRepository.GetAll().FirstOrDefault();

            item.Name = "Heheszki";
            MeasurementRepository.Save(item);
            MeasurementRepository.Flush();
        }
Ejemplo n.º 2
0
        public ActionResult <Entities.Measurement> AddMeasurement(Models.MeasurementDto measurement)
        {
            var measurementEntity = _mapper.Map <Entities.Measurement>(measurement);

            _measurementsRepository.AddMeasurement(measurementEntity);
            _measurementsRepository.Save();

            return(CreatedAtRoute("AddMeasurement",
                                  new { measurementId = measurementEntity.MeasurementId },
                                  measurementEntity));
        }
Ejemplo n.º 3
0
 public void createMeasurement(MeasurementModel measurement)
 {
     try
     {
         mrepo.Add(measurement);
         mrepo.Save();
         log.Info("Measurement von RestService wurde gespeichert.");
     }
     catch (BLException exp)
     {
         log.Error("Measurement von RestService konnte nicht gespeichert werden.");
         throw new BLException("Measurement von RestService konnte nicht gespeichert werden.", exp);
     }
 }