Hi,
I'm working with odata. Here I get a requirement where I need to have a WebApi method which generate the metadata xml by the given entity name, like this:
string GetSingleEntityMetadata(string entityName);
the return result should exactly like the request from /$metadata does, but just contains the specified entity.
Is there a way to achieve that?
BTW, Is there a way to create these XML edm model from IEdmModel? In my code, the IEdmModel is already available.
var builder = new ODataConventionModelBuilder();
builder.EntitySet<Contact>("Contacts");
builder.Namespace = typeof(Contact).Namespace;
var model = builder.GetEdmModel();