Ejemplo n.º 1
0
 public async Task IncrementAsync(SeriesPoint point)
 {
     using (var connection = await db.Context.GetConnectionAsync())
     {
         await connection.ExecuteAsync(
             @"INSERT INTO `SeriesPoints`(seriesId, timestamp, value) VALUES (@seriesId, @timestamp, @value)
               ON DUPLICATE KEY UPDATE value = value + @value;", point
             );
     }
 }
Ejemplo n.º 2
0
 public async Task InsertAsync(SeriesPoint point)
 {
     await db.SeriesPoints.InsertAsync(point);
 }