public async Task <IActionResult> Post([FromBody] PointModel <double> data) { if (data != null) { Console.WriteLine(JsonSerializer.Serialize(data, new JsonSerializerOptions { WriteIndented = true })); await _writer.WriteAsync(data); } else { Console.WriteLine("data == null"); } return(Ok("ok")); }
public async Task WritePoco() { var random = new Random(); //await _writer.WriteAsync(new Temperature { Location = "UNSW", Value = 94D, RLTestColumn = 123D, Time = DateTime.UtcNow }); await _writer.WriteAsync(new Temperature { Location = "UNSW", Value = random.Next(0, 100), RLTestColumn = random.Next(0, 100), Time = DateTime.UtcNow }); }