2
我有一个包含四个表的实体框架模型,我们需要关注的唯一两个是[AtmAccounts]和[Transactions]。 [AtmAccounts]具有以下属性:[Id -Primary Key],[AccountNumber],[AccountBalance],[UserId]和[AccTypeId]。事务具有以下内容:[Id-主键],[TransAmount],[TransDate],[AtmAccountId - 导航属性]和[TransTypeId]。通过外键从相关表中检索数据
我想要获取特定帐户的交易清单并将它们显示在屏幕上。为此,我需要从Transaction表中获取与存储在AtmAccounts中的AtmAccountId相对应的所有记录。我该如何解决这个问题?
'db.Transactions.Where(s => s.AtmAccountId == someAccountId“)'? – Shyju
@JayRoberts会为您做上述工作吗? –