I have several objects:
Public Class Person() { public int Id {get;set;} public IList<Account> Accounts {get;set;} public string Email {get; set;} } public class Account(){ public int Id {get;set;} public IList<AccountPayment> Payments {get;set;} public IList<Venue> Venues {get;set;} } public class AccountPayment(){ public int Id {get;set;} public DateTime PaymentDate {get;set;} public decimal PaymentAmount {get;set;} } public class Venue(){ public int Id {get;set;} public string AddressLine1 {get;set;} public string Postcode {get;set;} }
These classes are mapped to MS Sql with nHibernate - the table has a table in the class ...
I want to create a method in my repository, GetAccounts (int PersonID), which will return a list with all the child account collections that will be involved in the most efficient way. Can someone give me any instructions on how to do this? I do not want to configure lists as subsamples in my mappings, if I can help ...
Thanks.
Paul source share