Let's say I have two objects:
public class Person{
string Name { get; set;}
Address Home { get; set;}
}
public class Address{
string Street{ get; set;}
string City { get; set;}
}
string sql = "Select Name, Home_street, Home_city from user";
var results = dc.ExecuteQuery<Person>(sql);
The problem here is that the Home street and home city are not populated. Is there a way I can make it work? I think it's solvable by using Association attribute, but not sure how.
I have the same problem if I use stored procedure. I'm trying to build a query tool so a lot of variables are not known ahead of time.