Windows Azure BizTalk Services provides a OData-based Trading Partner Management Object Model (TPM OM) that can be used to create X12 and AS2 agreements, which can be deployed on Windows Azure BizTalk Services. Using the TPM OM, I have created a couple of samples that demonstrate how to use the OM with C#.

You can download the sample from the following links:

More Resources for BizTalk Services TPM OM