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