Entity Framework - Where are my Navigation Propert

2019-08-26 00:52发布

When I am generating ADO.NET Entity Data Model from Northwind I am getting well-structured Data Models with both scalar and navigation properties, but when I am generating from my own Database, I get only scalar properties and no navigation properties.

Why?

and how can I get those navigation properties for my own database Tables?

1条回答
2楼-- · 2019-08-26 01:50

Your DB is not structured in a way that the Add/Update wizard can recognize. Not using foreign keys, for example, would cause this behavior.

If this is not the problem and you can't figure out why the wizard doesn't recognize your keys, post the DDL for two related tables and any constraints you may have defined between them and I'll try and help.

查看更多
登录 后发表回答