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

Implement reverse engineering of views for SQLite #15627

Merged
merged 1 commit into from
May 9, 2019

Conversation

ErikEJ
Copy link
Contributor

@ErikEJ ErikEJ commented May 5, 2019

Part of #1679

@smitpatel
Copy link
Member

@ErikEJ - We also need to update code to scaffold EntityType class for these DatabaseModels & appropriate code in OnModelCreating. The feature is not done till then. At present it would generate DatabaseModel but then generate warning that could not scaffold entityType for it.

@ErikEJ
Copy link
Contributor Author

ErikEJ commented May 6, 2019

Ok, I thought this was already done.

@ErikEJ
Copy link
Contributor Author

ErikEJ commented May 6, 2019

@smitpatel Where does the scaffolding code gen reside? Looking in vain.

@smitpatel
Copy link
Member

@ErikEJ - RelationalScaffoldingModelFactory at present blocks the EntityTypes to be generated when there are no PK. Check RelationalScaffoldingModelFactory.VisitTable method.

After it pass-through that as keyless entityType, you would need to modify CSharpDbContextGenerator.GenerateEntityType code to skip key if not present and rather generate HasNoKey() API.

@ErikEJ
Copy link
Contributor Author

ErikEJ commented May 9, 2019

@smitpatel Can this be merged?

@smitpatel smitpatel merged commit 97b7479 into dotnet:master May 9, 2019
@smitpatel
Copy link
Member

@ErikEJ - Sorry, forgot to merge this earlier.

@ErikEJ
Copy link
Contributor Author

ErikEJ commented May 9, 2019

Thanks!

@ErikEJ ErikEJ deleted the issue-1679-part2 branch July 22, 2019 07:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants