这是一个有趣的问题。假设我们在数据库中有相关的表,例如 Instrument 和 Currency。Instrument 表有一个 currency_id 字段,该字段映射到 Currency 表中的条目。在 Linq 土地上有什么更好的方法:
a) 在 DataContext 中创建 Instrument 和 Currency 实体,然后创建关联或简单地在 Linq 查询中使用 join 或
b)在数据库中创建一个视图,将 Instrument 和 Currency 连接起来(从而将 currency_id 解析为货币代码)并将其用作 Linq 上下文中的实体?