public HistoryDto Load_history_by_id(string id)
        {
            var history = _repo.Load_history_by_id(id);

            return(new HistoryDto {
                ExpirationDate = _repo.Calculate_expiration_date(history.LastUsed),

                Id = history.Id,
                Email = history.Email,
                Name = history.Name,
                HistoricalData = history.HistoricalData.Select(d => new DatapointDto {
                    Value = d.Value, Tags = d.Tags
                }).ToArray(),
                Tags = history.Compile_tags()
            });
        }