Esempio n. 1
0
		public static bool AddMeasure(Measure measure)
		{
			using (var context = DatabaseContext.Initialize())
			{
				context.Measures.Add(measure);
				context.SaveChanges();
			}
			return true;
		}
Esempio n. 2
0
		public static Measure CreateMeasure(Guid deviceUID, int tariffPartNo, float value, double? moneyValue, DateTime dateTime)
		{
			var measure = new Measure();
			measure.DeviceUID = deviceUID;
			measure.TariffPartNo = tariffPartNo;
			measure.Value = value;
			measure.MoneyValue = moneyValue;
			measure.DateTime = dateTime;
			return measure;
		}