I'll try to simplify my problem as much, as possible.
Feel free to comment and correct my English. Hope you can understand me.
My main question is: Is there any simple and "automated" way, to fill a table in dataset only with rows related to data in other table?
Let's say, we have database with following schema:

Now, i'm trying to make the same thing with table "Orders", and create custom method "FillByDate". It works, but there is small problem:
DataSet1 myDataSetInstance = new DataSet1();
DataSet1TableAdapters.OrdersTableAdapter OrdersTA = new DataSet1TableAdapters.OrdersTableAdapter();
OrdersTA.FillByDate(myDataSetInstance.Orders, new DateTime(2013, 1,1), DateTime.Now);
foreach (var row in myDataSetInstance.Orders)
{
MessageBox.Show(row.Comments); // OK
MessageBox.Show(row.CustomersRow.Name); //NULL
}
Getting related row from Customers table is impossible - first i have to manually fill that table. I can see two ways to do this
- Getting whole content of this table - but it will be A LOT of unneeded data
- Create custom query in it's TableAdapter - something like FillByOrdersByDate(@Date1, @Date2) - it is easy, when I have only 2 tables and 1 relation, but with more tables this method will require dozens of custom queries for each TableAdapter.
I really believe, that there have to be "better" way to do this.