public async Task WriteToTable(StatusEntity entity, ILogger log) { var table = await _tableStorage.GetTableAsync(); log.LogInformation("Inserting into table:\n\t {0}\n", table.Uri); TableOperation insertOrMergeOperation = TableOperation.InsertOrMerge(entity); }
public async Task <IActionResult> ListAllLogsFromPeriod( [HttpTrigger(AuthorizationLevel.Function, "get", Route = "entities/")] HttpRequest req, ILogger log) { string periodReqStr = req.Query["date"]; CloudTable table = await _tableStorage.GetTableAsync(); var query = _tableQuery.GetTableQueryByDateRange(periodReqStr); var statusEntity = await table.ExecuteQuerySegmentedAsync(query, null); return(new OkObjectResult(statusEntity)); }