예제 #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
             );
     }
 }
예제 #2
0
 public async Task InsertAsync(SeriesPoint point)
 {
     await db.SeriesPoints.InsertAsync(point);
 }