Re: How to use typed datasets in 3-tier environment



I normally code everything manually so it's very easy to create a
Data Access class and passing typed dataset to it.

The typed DataSet objects don't need to know anything about the
SqlDataAdapter, they are being pass into the Data Access layer and
the DAL will do the rest, insert, update and delete.

Check out the MSDN written Data Access Layer class,
You can download it and use it on your project.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnpag2/html/daab.asp

There maybe some way you can do the same in a VS designer/drag and drop
fashion.
but I'm not familiar with it, coding everything manually has more
flexibilities.

3-tier design is mainly for enterprise level application.
If you don't need it, you don't have to use it.

david




"Gabriel Lozano-Morán" <gabriel.lozano@xxxxxxxxxxxxx> wrote in message
news:%23A7ncwrOFHA.3156@xxxxxxxxxxxxxxxxxxxxxxx
> Hello David
>
> I think I will go for the common assembly approach by creating a seperate
> assembly containing nothing but the typed datasets.
>
> In your reply you said that you use the data access layer to fill the
typed
> dataset objects. I have added a component class to my data access layer
and
> I can drag and drop tables from my database and to have the
SqlDataAdapters
> automatically generated but these SqlDataAdapters are private within the
> component. Is there a better approach?
>
> TIA
>
> Gabriel Lozano-Morán
>
> "David Lei" <wei328@xxxxxxxxxxxxx> wrote in message
> news:OGGoXKrOFHA.1732@xxxxxxxxxxxxxxxxxxxxxxx
> >I usually put the typed dataset objects within the businese logic layer,
> > Presentation layer has a reference to businese logic layer, thus "knows"
> > all
> > the available typed dataset objects.
> >
> > Businese logic layer contains a reference to data access layer, using it
> > to
> > fill the typed dataset objects and perform businese rules on them.
> >
> > Presentation layer does not need or should know about the data access
> > layer.
> > Data access layer should not or need to know anything about the typed
> > dataset objects.
> >
> > You can also have a separate assembly containing all your typed dataset
> > objects,
> > and reference it in both the presentation and businese layers.
> >
> > david
> >
> >
> > "Gabriel Lozano-Morán" <gabriel.lozano@xxxxxxxxxxxxx> wrote in message
> > news:ONU%23t9qOFHA.524@xxxxxxxxxxxxxxxxxxxxxxx
> >> What is the proper way of working with typed datasets in a 3-tier
> >> environment? Should I use a common assembly for the typed datasets that
> > can
> >> be referenced in the presentation layer, business logic layer and the
> >> data
> >> access layer? I really don't want to add a reference to my data access
> > layer
> >> in my presentation layer.
> >>
> >> All help (links to articles, code snippets, ...) is welcome
> >>
> >> TIA
> >>
> >> Gabriel Lozano-Morán
> >>
> >>
> >
> >
>
>


.



Relevant Pages

  • Re: DBMS and lisp, etc.
    ... >> write a data access layer specific to my application and implement it ... but will destroy performance on a DBMS. ... it's tempting to just have references to related objects as sublists ...
    (comp.lang.lisp)
  • Re: Circular dependency
    ... the business logic layer gets a request for an object. ... instantiates the object and passes it down to the data access layer. ... I expected to seperate each layer into different projects and reference ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Circular dependency
    ... Then both the Data Access Layer and the Business Logic Layer ... I expected to seperate each layer into different projects and reference ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Do you use the new datasource controls?
    ... It's fine for my dad's website, but not for the enterprise architecture I'm building, which will eventually need to have a web service. ... The code in the button click should be quite deeper, it should be encapsulated in a data access layer and exposed via a rich business layer. ... You don't actually need a DAL anymore, you just set properties of the data source and the framework does the dirty work for you. ...
    (microsoft.public.dotnet.framework.aspnet)
  • solution architecture regarding typed datasets
    ... forms, web forms, business classes, and a data access layer. ... I have been diligent about separating UI from business rules and objects, ... To populate a typed dataset, to be used as a datasource for a datagridview, ... It seems inappropriate to me that a separate function in the data access ...
    (microsoft.public.dotnet.languages.csharp)

Loading