Jak dołączyć do wielu stołów?
Mam następujące klasy. Mam przedmiotvar
klasy opisu. Chcę wybrać saldo związane z klientem podane wvar
obiekt używający Linq do wyrażenia Sql lub Lambda. Jak dołączyć do tych tabel, aby uzyskać tabelę Saldo z konta?
public class Description
{
public int DescriptionID { get; set; }
// Attributes
public int ClientID { get; set; }
[ForeignKey("ClientID")]
public virtual Client Client { get; set; }
}
public class Client
{
public int ClientID { get; set; }
// Attributes
public int UserID { get; set; }
[ForeignKey("UserID")]
public virtual User User { get; set; }
}
public class User
{
public int UserID { get; set; }
// Attributes
}
public class Account
{
public int AccountID { get; set; }
[Required, Column("Balance"), Display(Name = "Account Balance")]
public double Balance { get; set; }
public int UserID { get; set; }
[ForeignKey("UserID")]
public virtual User User { get; set; }
}