Example #1
0
        public static WeightList MapFrom(List <WeightMeasurement> weights)
        {
            WeightList result = new WeightList();

            foreach (var weight in weights)
            {
                result.Weights.Add(WeightGet.MapFrom(weight));
            }

            return(result);
        }
        public static WeightGet MapFrom(WeightMeasurement weight)
        {
            WeightGet result = new WeightGet();

            result.EntryDate = weight.EntryDate;
            result.Id        = weight.Id;
            result.Unit      = weight.Unit.ToString();
            result.Weight    = weight.Weight;

            return(result);
        }