It's been a couple of years since I worked with EF and OData. Back then, OData was on WebAPI was limited to some URL filters, but even that was pulled at the last minute before MVC 4 RTM.
A lot has changed.
Now I have a model-first EF6 project with an EDMX file, since I like to visually plan my model. I am also building an OData service for this app, using WebAPI 2.2 and OData 4.0.
There's a comment on the question below:
"Unfortunately, at this time the EDM model used by EF is different from the EDM model used by Web API OData."
Which is understandable, the separation is best for public APIs.
However, I'm confused because the quick start tutorials on the web (see below) seem to be using the same EF (code-first) model for both OData and the database.
Does that mean that the models are no longer different, the comment above is old? Or does it mean that I must go code-first if I want to just expose my database model?
And since the tutorials seemingly show exposing a single EF database model, then how does one go about separating and having two models?
I'm having difficulty finding/trusting online resources because these technologies are so fast-moving.
Luke