public Measurement(MeasurementEntity measurementEntity, Installation installation, MeasurementItem measurementItem) { Current = measurementItem; History = JsonConvert.DeserializeObject <IEnumerable <MeasurementItem> >(measurementEntity.History); Forecast = JsonConvert.DeserializeObject <IEnumerable <MeasurementItem> >(measurementEntity.Forecast); Installation = installation; }
public MeasurementItemEntity(MeasurementItem current) { this.FromDateTime = current.FromDateTime; this.TillDateTime = current.TillDateTime; this.Values = JsonConvert.SerializeObject(current.Values); this.Indexes = JsonConvert.SerializeObject(current.Indexes); this.Standards = JsonConvert.SerializeObject(current.Standards); }
public Measurement(MeasurementItem measurementItem, Installation installation) { Current = measurementItem; Installation = installation; }