Exemple #1
0
        public void Add(Experiment e)
        {
            e.Id = Db.GetNextExperimentID();

            var data = ToJSON(e);

            var parameters = e.Parameters.Select(pair => new Dictionary <String, String>
            {
                { "experiment", e.Id.ToString() }, { "name", pair.Key }, { "value", pair.Value }
            });

            Db.Insert("Experiments", data);

            foreach (var parameter in parameters)
            {
                Db.Insert("Parameters", parameter);
            }

            foreach (var m in e.GetMeasurements())
            {
                _measurementsDAO.Add(m, e);
            }
        }
Exemple #2
0
 public void AddMeasurement(Measurement m, Experiment e)
 {
     _measurements.Add(m, e);
 }