Ejemplo n.º 1
0
        public void Update(Experiment e)
        {
            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.Update("Experiments", data, where : String.Format("Experiments.ID = {0}", e.Id.ToString()));

            foreach (var p in parameters.Where(p => p != null))
            {
                Db.UpdateParameters(p, String.Format("Parameters.name = {0} and Parameters.value = {1}", p["name"], p["value"]));
            }

            foreach (var m in e.GetMeasurements())
            {
                _measurementsDAO.Update(m, e);
            }
        }
Ejemplo n.º 2
0
 public void UpdateMeasurement(Measurement m, Experiment e)
 {
     _measurements.Update(m, e);
 }