Suggestion for TableAdapter methods

As you know, DataSets use TableAdapters to host data access methods. For example, if I define a new DataSet, there will be one TableAdapter automatically added with two methods "Fill" and "GetData". In the Dataset designer, I can use the TableAdapter configuration wizard to tell the system the actual SQL statements (or SProc calls) behind those TableAdapter methods.

When I'm coding, I can use those TableAdapter methods to get data from the DB. So far, so good.

Very often, I want to know what SQL statement is behind a TableAdapter.GetDataByXY() method. However, with VS, it is very hard to actually get this information:
a) I have to open the DS designer (which can take a long time, depending on the connection, the number of datatables and so on)
b) I have to find the right Table Adapter on the surface of the designer
c) I have to open the Table Adapter config wizard
d) I have to paginate through to the page where the SQL statement is.


R# could be a great help here with - I guess - just a little effort. The SQL statement is buried in the DataSet designer.cs code, in the InitCommandCollection() method. So it must be a non-brainer for R# to parse this method, and give me the SQL statement when I'm asking for it. This could perhaps be done when I'm on a TableAdapter method in code and press Ctrl+Q (for QuickInfo). This would save me from spending two or three minutes every time I want to see what's "behind" a TableAdapter method.

I'm sure this would help a lot of people who are still dealing with the clumsiness of the DataSet designers every day.

Please sign in to leave a comment.