You could change it manually to 0..1 by updating relation properties in model designer
entity framework update relationship from database
-
24-03-2022 - |
Question
i have two table which have relation, tables like that:
First Table: ProductionDemand --- ID(PK),Name,RevisionID(FK, not null)
Second Table: Revision --- ID(PK), Name
I create model by using two tables and the other tables (about 20 tables)
But then RevisionID(FK, not null) to RevisionID(FK, null) and update model from database, i selected ProductionDemand table from refresh tab. I build my project and it failed. I get error from foreign key and entity classes not loaded.
I hope you know what I issue.
Note: The relation which is 1..* not changed in diagram after model updating. It must be 0..1 ....*
La solution
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow