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)); }
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; }