예제 #1
0
		public static bool AddMeasure(Measure measure)
		{
			using (var context = DatabaseContext.Initialize())
			{
				context.Measures.Add(measure);
				context.SaveChanges();
			}
			return true;
		}
예제 #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;
		}