Search code examples
.netodata

Can I build an OData Model from a saved XML file?


I'm trying to avoid reading the odata metadata from a service repeatedly (to reduce bandwidth and increase responsiveness). Is there any reason I can't call:

Microsoft.Data.Edm.Csdl.EdmxReader.TryParse(xml_stream, out model, out errors)

Passing it a saved copy of the metadata xml? Assuming there's no change in the metadata of course. Since it's just XML being passed in at this point - that should be fine. But I figure better to ask and make sure.


Solution

  • I tested this every way I can think of - works fine.