Skip to content

Instantly share code, notes, and snippets.

@ealsur
Created October 20, 2022 21:13
Show Gist options
  • Save ealsur/320fcda298d91c59507437a8e9649fd5 to your computer and use it in GitHub Desktop.
Save ealsur/320fcda298d91c59507437a8e9649fd5 to your computer and use it in GitHub Desktop.
Azure Functions Trigger with custom type
[FunctionName("Function1")]
public static void Run([CosmosDBTrigger(
databaseName: "test",
containerName: "items",
LeaseContainerPrefix = "test",
Connection = "cosmosDB")]
IReadOnlyList<MyPOCOWithSystemTextJson> input, ILogger log)
{
//...
}
public class MyPOCOWithSystemTextJson
{
[JsonPropertyName("id")]
public string Id { get; set; }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment