public virtual void Create(Measurement measurement)
        {
            if (measurement == null)
                throw new ArgumentNullException("measurement");

            Dispatcher.Dispatch(AddMeasurement.CreateFrom(measurement));
            Cache.AddToList(measurement);
        }
 public static AddMeasurement CreateFrom(Measurement measurement)
 {
     return new AddMeasurement {
         EventId = measurement.EventId,
         Id = measurement.Id,
         GroupId = measurement.GroupId,
         LogId = measurement.LogId,
         LogName = measurement.LogName,
         Name = measurement.Name,
         Quantity = measurement.Quantity,
         Unit = measurement.Unit,
         UpdatedDate = measurement.UpdatedDate,
         UserId = measurement.UserId,
         Date = measurement.Date
     };
 }
 public void Post(Measurement measurement)
 {
     MeasurementRepository.Create(measurement);
 }
 public override void Create(Measurement measurement)
 {
     Repository.HttpRequestor.Post(ConfigurationProvider.DataServiceLocation + "measurements", measurement, Repository.SessionManager.GetCurrent());
     Cache.AddToList(measurement);
 }