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
merged 1 commit into from Jun 28, 2016

Conversation

Projects
None yet
2 participants
@chinadragon0515
Copy link
Contributor

chinadragon0515 commented Jun 27, 2016

Issues

This pull request fixes issue #413 .

Description

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>
<EntityType Name="Contact">
<EntityType Name="Product">

This comment has been minimized.

Copy link
@chinadragon0515

chinadragon0515 Jun 27, 2016

Author Contributor

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

@chinadragon0515 chinadragon0515 force-pushed the chinadragon0515:modelkey branch from e949d41 to 00cbdb0 Jun 28, 2016

@chinadragon0515 chinadragon0515 force-pushed the chinadragon0515:modelkey branch from 00cbdb0 to c542db6 Jun 28, 2016

@chinadragon0515 chinadragon0515 merged commit c542db6 into OData:master Jun 28, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.