Re: Visual design tools and DAL in VS 2005 / .NET 2.0 by Paul
Paul
Mon Nov 28 01:39:38 CST 2005
Thanks for the reply.
I'm not asking for code for a full enterprise application. As mentioned, I
have written Enterprise scale apps with 1.0, and 1.1, using a DAL, and they
scale well.
However, the IDE in VS2005 gives a lot more flexibility to put together a
design graphically.
I'm really looking for 'Best Practice' guides for creating a DAL, but
making use of the Graphical design functionality provided by the IDE in VS
2005, rather than doing it all in code, as I did in 1.0, & 1.1.
Does such a guide exist?? or are there any examples of doing this anywhere?
Thanks
"Nicholas Paldino [.NET/C# MVP]" <mvp@spam.guard.caspershouse.com> wrote in
message news:Ou25%23x68FHA.1020@TK2MSFTNGP15.phx.gbl...
> Paul,
>
> See inline:
>
>> 1). If I want to use a common ConnectionString (ie. just have it coded in
>> one place), how can I bind each of my controls to this connection?? (ie.
>> I don't want to change 100's of controls if my connection string
>> changes).
>
> Well, you could always load it and then store it in a static variable.
> Then, you just access the static variable.
>
> The preferred way though is to store it in the app config file. There
> is a specific section for connection strings now. Since there is only one
> app config file for an app, if you know the appropriate key, you can get
> the connection string from any assembly.
>
>> 2). I want to keep in mind the 'Enterprise' way of doing things, via a
>> DAL or Business Layer.
>> Does anyone have any good source (C#), which shows the implementation of
>> a Front end, DAL, and the component bindings. This can be using SQL
>> commands, or Stored procedures, but I would appreciate details of Updates
>> / Inserts etc, as well as simple selects (so that I can see the impact on
>> Table Adapters etc).
>
> That's a bit of a tall order. Basically, you are asking for the source
> for a full enterprise application, which is no small task. At the core of
> it though, you should create stored procedures to handle your
> updates/deletes/inserts, as well as your queries. Then, you create your
> data adapters, which will perform the necessary updates, and populate your
> data sets.
>
> Now, you can use an object layer, if you want, or use data sets for
> transporting your data. Once you decide on that, you can easily bind that
> to your UI.
>
> Hope this helps.
>
>
> --
> - Nicholas Paldino [.NET/C# MVP]
> - mvp@spam.guard.caspershouse.com
>
>>
>> Thanks in advance
>>
>>
>> Paul
>>
>
>