Adding external tables to a strongly typed dataset?

E

Earl

My project schema looks something like this:

ClassWidget
SelectWidgetAsDataTableTable
UpdateWidgetDataTable
AddToWidgetDataTable
DeleteFromWidgetDataTable

What I'm trying to do is maintain separation between the data layer and the
UI layer. I clearly do not want all that dataadapter gunk up in the UI
classes. But I also want to add those "widget" datatables to a strongly
typed dataset in the UI class so I can use the strongly typed properties.
Any thoughts on the easiest way to do this?
 
C

Cowboy \(Gregory A. Beamer\)

2.0 or 1.1?

In 2.0, you can add the table adapters for each "table". yes, it may appear
to be "gunking", but it is really not as bad as the "three tiers in one"
objects that you see in the travelling carnival shows. :) If you do not
like the table adapters, you can make you own data access model to fill the
tables.

As for the filling, updating, etc., the easiest way I have found to set up
this type of model is to add attributes to the DataTables created to
indicate order of loading. You then update, etc. in reverse order. You can
code gen this from dependencies if you are using a RDBMS like SQL Server or
Oracle. If you follow this type of model, the DAL class(es) fill or save
using the attributes. It is a simple matter of passing the DataSet to the
DAL and letting it do the work. Once you have the model down, you can create
a code gen (and then open source it or sell it ;->)

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

*************************************************
Think outside of the box!
*************************************************
 

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