How to get list of object and their relation details from database without entity frameworkk
Hi all,I want to get primary key table details as list of object and their relation in same object with list of other object without using entity framework.
i am able to convert primary key table details in list of object after converting datatable to list using generic method but how can i get list of foreign key table details in same object. i don't want to use entiry framework .please help .thanks in advance.
my class details below
public class Orderdetails
{
int orderid;
int id;
int qty;
}
public class userdetails
{
public int id { get; set; }
public string name { get; set; }
public string address { get; set; }
public string phone { get; set; }
public string pin { get; set; }
public int type { get; set; }
public List<Orderdetails> order { get; set; }
}
i want to get like list<userdetails> and inside that list<Orderdetails>