How does the Entity Framework determine whether to use the multiplicity of "one" or "zero or one" for relationships?

I programmatically create an edmx file as part of the code generation process, and I would like to know how the designer decides to use “1” or “0..1” for relationships when you “update the model from the database”. Any understanding of this? Thanks

Edit:

Well, I think it uses "0..1" when the "many" side is a null foreign key and "1" if it is not NULL. Can anyone confirm this?

+3
source share
2 answers

, "0..1" "1" , "" .

, ( 1 1 ), 1 () 0..1 (Child).

edmx, . Entity Framework LINQ to SQL Oracle, MySQL, PostgreSQL, SQL Server SQLite . SQL Server , Entity Framework, . , Oracle, , .

+4

. EF , .

0

Source: https://habr.com/ru/post/1711193/


All Articles