Republished With Permission - Original
One of my goals over the next few weeks is to publish a
number of quick tutorial postings that walkthrough implementing common data
binding design patterns using ASP.NET 2.0 (master details, filtering, sorting,
paging, 2-way data-binding, editing, insertion, deletion, hierarchical data
browsing, hierarchical drill-down, optimistic concurrency, etc, etc).
To help keep these samples shorter, and to help link them
together, I’m going to use a common DAL (data access layer) implementation
across the samples that is based on SQL Server’s Northwind sample database.
To build the DAL layer I decided to use the new DataSet
Designer that is built-into Visual Web
Developer (which you can download for free) as well as VS 2005, and which
provides an easy way to create and encapsulate data access components within an
application. I’ve used it for a few
samples lately, and have found it pretty useful and flexible. I really
like the fact that it enables me to avoid having to write tedious data access
code, while still preserving full control over my SQL data logic (I also like
the fact that it enables me to use both standard SQL statements as well as SPROCs).
One of the things that I’ve noticed is that there aren’t a
lot of end-to-end tutorials that show off how to build and use a DAL with the
designer (one exception is the great write-up by Brian
Noyes – who includes samples of how to use it with SPROCs). What I’ve
tried to-do with the below set of tutorials is provide an end-to-end,
step-by-step, walkthrough that covers all of the core concepts involved in
creating and consuming a DAL built with the data designer.
Using the data designer and ASP.NET 2.0 together, you should
be able to create a core DAL implementation and build from scratch a
data-driven UI web app on top of an existing database very quickly (~10-15 minutes
to build an application from scratch that supports master/details filtering
along with data paging, sorting, insertion, and editing).
The final result of the below walkthroughs can be downloaded
This download includes all of the code samples as well as the DAL built up
I’ll then be posting lots of (much shorter! <g>) blog
posting over the next few weeks that show off common data-UI patterns that use