Customizing MSDataSetGenerator output in VS2005

S

Stig

Hi,

I am using a strongly typed dataset in .Net 2.0, and would like all
tables to inherit from a cusomt datatable class instead of DataTable.
The reason for this is that I want some common code excuted on the row
events, and this I want to implement this once in a Table base class.

ie. instead of having this code generated:

public partial class ActivitiesDataTable : System.Data.DataTable,
System.Collections.IEnumerable {

I would like the tables to inherit from MyDataSet like this:

public partial class ActivitiesDataTable : CustomDataTable,
System.Collections.IEnumerable {


1) How can this be achieved. Is it possible to create a custom
generator that inherits from the MSDataSetGenerator, and override the
parts where the nested table classes are generated ?

2) In what assembly can I find the MSDataSetGenerator to do this?

3) Now that .Net 2.0 MSDataSetGenerator uses partial classes for the
DataSet, table and row classes, I could add my code without having it
overridden, but then I would have to edit each and every table and row
class in the generated dataset.

4) What is the best solution to customize the generated typed datasets
?


Regards

Stig Nielsson
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top