Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Change DataSet's namespace
Message
From
16/03/2006 01:23:15
 
 
To
16/03/2006 01:01:11
General information
Forum:
ASP.NET
Category:
ADO.NET
Miscellaneous
Thread ID:
01104336
Message ID:
01104802
Views:
7
In 2.0 there is no need to subclass. Along with the XSD you get a CS that is a partial class. So you just need to create your own class and add appropriate methods.

>Einar,
>
>I've mentioned in the past the idea of sub-classing Typed DataSets. Not necessarily for the reason of putting them in different namespaces (I keep them together in the same projects), but for reasons of adding functionality to the DataSet.
>
>~~Bonnie
>
>
>
>>Keith,
>>Interesting approach. Thanks.
>>
>>Einar
>>>Einar, you can declare a class that inherits the dataset and put the declared class in any namespace that you like.
>>>
>>>>>Isn't that what I said? <g> Well, all except for the folder name ... not sure where that comes from ... I don't see that anywhere in my stuff.
>>>>
>>>>If you add a folder to your project and then add a dataset inside the folder the dataset's namespace should include the folder name (well it does no my machine under .NET 2.0 <s>) .
>>>>
>>>>>
>>>>>Yeah, I don't know why you would want to have your DataSet's namespace be anything different than the assembly (project, DLL, whatever term you want to use ... they all mean the same thing). If you can remember the reason why, let us know. (It's a bitch getting old, isn't it> <g>)
>>>>
>>>>I will but don't hold your breath :) Yes getting old is not a walk in the park.
>>>>
>>>>>
>>>>>~~Bonnie
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>>That is almost correct :) The namespace is: [the assembly's default namespace].[folder name] that the .xsd is in.<g>
>>>>>>Anywho so I guess it is impossible to change a dataset's namespace manually.
>>>>>>Currently I can't remember why I feelt the need to change the dataset's namespace, but if it was a good idea I am sure it will come back to me lol
>>>>>>
>>>>>>Thanks for the reply.
>>>>>>
>>>>>>>Einar,
>>>>>>>
>>>>>>>It should generate the namespace of the project that the .xsd is in.
>>>>>>>
>>>>>>>~~Bonnie
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>>How can I change my typed dataset's namespace (permanently)?
>>>>>>>>I have tried opening the cs file and change the namespace manually and that works until the dataset designer is opened and the cs file is rebuilt.
>>>>>>>>The namespace property in the properties sheet show http://tempuri.org/DataSet1.xsd so I don't think this is the place to change it.
>>>>>>>>
>>>>>>>>Any assistance would be appreciated.
>>>>>>>>Thanks,
>>>>>>>>Einar

(On an infant's shirt): Already smarter than Bush
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform