creating a data layer

  • Thread starter Thread starter jay widman
  • Start date Start date
J

jay widman

We use sql and like the way we can create a window,
have the .NET ide find a datatable,generate a connection,
generate a sqladapter, and generate a dataset tied to
that adapter. We also like the way that the .NET ide
will automatically generate the add,modify and delete
commands on that sqladapter and dataset.
However, we want isolate our data layer from any
particular window. Can .NET generate a class independent
of a window which automatically contains these
sqlconnections, sqladapters, and datasets?
As a last resort, what we may have to create a "dummy"
windows app which automatically generates a
sqlconnection, sqladapter, and dataset and cut the code
out of the InitailizeComment section and paste it into
our own class.
Any suggestions would be greatly appriciated.
thanks in advance
jay widman
 
jay widman said:
We use sql and like the way we can create a window,
have the .NET ide find a datatable,generate a connection,
generate a sqladapter, and generate a dataset tied to
that adapter. We also like the way that the .NET ide
will automatically generate the add,modify and delete
commands on that sqladapter and dataset.
However, we want isolate our data layer from any
particular window. Can .NET generate a class independent
of a window which automatically contains these
sqlconnections, sqladapters, and datasets?

Sure it can. You can place it in a component derived class if you have to.
As a last resort, what we may have to create a "dummy"
windows app which automatically generates a
sqlconnection, sqladapter, and dataset and cut the code
out of the InitailizeComment section and paste it into
our own class.

Or, use free tool CodeSmith with my (or other) templates.
Check out my web page
http://www.rthand.com/Default.aspx?Page=2&SubPage=1
I have few templates that generate strong typed dataset schema and adapters.
 
Back
Top