Projects with a 'Data' namespace

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi. The project I am working on has its own Data namespace (e.g. MyApp.Data
). Within this namespace there are System and DataSet namespaces/folders
(e.g. MyApp.Data.System and MyApp.Data.DataSets ).

Because of this the autogenerated dataset classes within the DataSets folder
have a name collision because the autogenerated file includes System.Data
references, and the the compiler is complaining that "The type or namepsace
'Data' does not exist in the class or namespace 'MyApp.Data.System'...".

Other than renaming my namespaces, is there a fix for this?

Thanks

kh
 
maybe put your database objects in separate assembly - I do this so they do
not mess with my classes
rgds

Peter
 
Kh,

Because that all ADONET classes inherits from System.Data, are you in
trouble when you leave your dataspace the same. You will have to name all
your classes with full path, while you have to do that as well with all
ADONET classes.

What you can do is setting a using/import = however you still have to set
than a prefix for all your classes.

I would just give it another name, than you and the ones who use your
classes feel themselves probably a lot more comfortable.

Just my thought,

Cor
 
Thanks Cor. Unfortunately the DataSet parser autogenerates the class that is
causing the errors and editing this would be dangerous and time consuming. I
suppose my question should have been "how can I influence the output of the
DataSet parser". As the path of least resistance, I have simply refactored
the project to MyApp.System and MyApp.DataSets.

Cheers

kh
 
Thanks Peter. This however is no different to refactoring the project (see my
response to Cor's post).

Cheers

kh
 
Back
Top