Home All Groups Group Topic Archive Search About

Code reuse and DataSet generation from XML schema

Author
1 Jan 2006 10:09 PM
Vagif Abilov
Hello,

I have several strongly typed DataSet classes that encapsulate the same
table. My challenge is that I can't reuse the wrapper code for this table
generated by Visual Studio, because although wrapper classes represent
identical structures, they have different identities.

If I have two strongly typed DataSets (DataSet1 and DataSet2) and both of
them wrap a table MyTable, VisualStudio duplicate the code in .cs files,
i.e. I get DataSet1.MyTableRow class and DataSet2.MyTableRow, so it is not
possible to have a common method DoSomethingWithMyTableRow(MyTableRow row) -
I have two different identities for MyTable row structures.

Does anyone know an approach for code reuse in such cases?

Thanks in advance

Vagif Abilov
Oslo Norway

AddThis Social Bookmark Button