Example #1
0
 public void AddSingleStatistic(StatisticDTO item)
 {
     using (UsageStatisticsModel db = new UsageStatisticsModel()) {
         db.UsageStatistics.Add(new UsageStatistics(item));
         db.SaveChanges();
     }
 }
        public void AddSingleStatistic(StatisticDTO item)
        {
            UsageStatiticsEntity statistic = new UsageStatiticsEntity(item);

            statistic.PartitionKey = string.Empty;
            statistic.RowKey       = Guid.NewGuid().ToString();

            table.Execute(TableOperation.Insert(statistic));
        }
Example #3
0
 public StatisticDTO(StatisticDTO item)
 {
     this.IdUsageStatistics = item.IdUsageStatistics;
     this.Time           = item.Time;
     this.Type           = item.Type;
     this.BaseUnit       = item.BaseUnit;
     this.BaseValue      = item.BaseValue;
     this.ConvertedUnit  = item.ConvertedUnit;
     this.ConvertedValue = item.ConvertedValue;
 }