I can generate an IEdmModel
from a $metadata document with something like this:
HttpWebRequest request = HttpWebRequest.CreateHttp("http://services.odata.org/v3/odata/OData.svc/$metadata");
ClientHttpResponseMessage metadataMessage = new ClientHttpResponseMessage((HttpWebResponse)request.GetResponse());
using (var messageReader = new ODataMessageReader(metadataMessage))
{
IEdmModel model = messageReader.ReadMetadataDocument();
}
Is there a way to do the reverse? Given a IEdmModel
generate the metadata document?