并非所有表格都导入到我的 edmx

not all tables were imported to my edmx

我正在研究 JQuery 移动项目,使用 EDMX + LINQ 获取 sql 查询。 处理了一段时间后,我注意到我的一个连接 table 没有导入到我的数据实体模型中,尽管我现在需要查询这个 table。

Here is the table (marked in blue) that was not imported properly

Here you can see the table in model browser but not in the diagram, hence i can't use it in my LINQ queries

我想它必须做一些事情,因为它是一个连接 table 并且它不是独立存在的,所以在这种情况下如果我仍然想查询这个我该怎么办使用 LINQ 而不是 SQL?

我猜是因为你的table没有主键,它的两个字段都是其他table的外键。我 运行 遇到了与 views/tables 不导入类似的问题。它需要自己的主键,例如 User_Activities_TB_ID.