Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you build OData IEdmModel from Entity Framework model

The title says it all really. I've found several blogs with different ways (serializing the EF model to XML and then de-serializing again to the IEdmModel was one) but they're all based on old version of the OData package.

like image 299
BenCr Avatar asked Dec 25 '22 18:12

BenCr


1 Answers

Serializing is the only way.

  • Example.
  • Relevant work.

I've ranted about this a few months ago. AFAIK nothing changed since then, and I personally don't expect them to change too much. The short story is that as of September 2012, there is no plan to use EdmLib in EF, nor is there to use EF's code in other projects.

How much should we align with OData’s EdmLib?

Not worth adopting code
    Cost of implementing SSDL & MSL
    Freedom to evolve our API independently 
Look at aligning names of types and properties where appropriate
like image 69
tne Avatar answered Mar 08 '23 09:03

tne