Beispiel #1
0
        public static async Task <IActionResult> Run([HttpTrigger(AuthorizationLevel.Anonymous, "delete", Route = "tableMRNotes/{id}")] HttpRequest req,
                                                     [Table("mrnotes", Connection = "AzureWebJobsStorage")] CloudTable notesTable,
                                                     ILogger log,
                                                     string id)
        {
            log.LogInformation("C# HTTP trigger function processed a request.");

            if (_dataSource == null)
            {
                _dataSource = new TableStorageDataSource(notesTable);
            }

            var note = await _dataSource.DeleteNoteAsync(id);

            return(new OkObjectResult(note));
        }