可以说我有这个参考设置
public class Account
{
Guid ID {get;set;}
string name {get;set}
}
public class Order
{
Guid ID {get;set;}
}
public class AccountOrder
{
Guid ID {get;set}
Guid AccountID {get;set}
Guid OrderID {get;set}
}
Now when I want to model this setup as so:
public class AccountOrderModel
{
//One account with many orders
string name {get;set}
List<Order>orders {get;set;}
}
我想使用 Linq 根据帐户订单参考获取所有订单的 1 个帐户。