public static Todo ToTodo(this TodoTableEntity todo) { return(new Todo() { Id = todo.RowKey, CreatedTime = todo.CreatedTime, IsCompleted = todo.IsCompleted, TaskDescription = todo.TaskDescription }); }
public static IActionResult GetTodoById( [HttpTrigger(AuthorizationLevel.Anonymous, "get", Route = "ToDo/{id}")] HttpRequest req, [Table("todos", "TODO", "{id}", Connection = "AzureWebJobsStorage")] TodoTableEntity todo, string id, ILogger logger) { logger.LogInformation("getting the ToDo list"); if (todo == null) { logger.LogInformation($"Item {id} not found"); return(new NotFoundResult()); } return(new OkResult()); }