Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make model auto pop keys from Entity framework. #454

merged 1 commit into from Jun 28, 2016


Copy link

@chinadragon0515 chinadragon0515 commented Jun 27, 2016


This pull request fixes issue #413 .


In Restier 0.5, the model building uses Web APi OData conversion model builder which finds keys of entity type based on ,
a. Whether there is any proeprty marked with key attribute.
b. Whether there is property with name ID or entitytypeNameID
But if the entity type does not define key in this way, then model build will fail

This issue retrieves keys from entity framework and set to model builder.

Checklist (Uncheck if it is not completed)

  • [ x ] Test cases added
  • [ x ] Build and test with one-click build and test script passed
@@ -12,34 +12,71 @@
<Property Name="Picture" Type="Edm.Binary" />
<NavigationProperty Name="Products" Type="Collection(Microsoft.OData.Service.Sample.Northwind.Models.Product)" />
<EntityType Name="Contact">
<EntityType Name="Product">
Copy link
Contributor Author

@chinadragon0515 chinadragon0515 Jun 27, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Already have detail compare, the changes in this file is only sequence change, no single line content change.


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants