Skip to content

Instantly share code, notes, and snippets.

@xuzhg
Created July 3, 2018 22:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xuzhg/2528597c2c9d81ba81a64a6f06d0fd1e to your computer and use it in GitHub Desktop.
Save xuzhg/2528597c2c9d81ba81a64a6f06d0fd1e to your computer and use it in GitHub Desktop.
EdmModelBuilder
public class Startup
{
// ...
private static IEdmModel GetEdmModel()
{
ODataConventionModelBuilder builder = new ODataConventionModelBuilder();
builder.EntitySet<Book>("Books");
builder.EntitySet<Press>("Presses");
return builder.GetEdmModel();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment