|
-
Jan 29th, 2007, 04:44 PM
#1
Thread Starter
Frenzied Member
advice on best practice
What is the best method to go about doing this?
i have a project that is my data access layer for a larger project which in turn is consumed by yet a third project. ( 3 tier design ). I need to be able to tell the data access layer which servers to use during run-time because I am using development servers, production servers and the servers may change names in the future.
I've implemented a property in each class that is within the data access project that is of the type 'SqlConnection' and any consumer that wishes to use the class must first pass in a reference to it's own sqlConnection object. This forces the upper layers of the whole solution to maintain those objects and forces pretty much every control/class to do this which is a maintenance nightmare.
This structure was designed on the fly. Is there a 'sexier' way to control the data connections? I'm using c# 2005.
I'm sure this has been asked a million times but I wasnt sure what keywords to use so I figured I simply spellout my problem.
Thanks in advance.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|