TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Bhanu Pratap Singh
NA
94
50.9k
how to make my database layer connect to multiple SQL db
Jul 9 2018 3:28 AM
I am using ADO.Net to connect with SQL server, i use my DBLayer to get data from Database and which returns DataTable and Dataset.
In Web API i desealize Datatable to JSOn which i got by calling BAL, and bal calls DAL.
Now the requirement is my WEb Api request will contain a Code in header, this header value will decide which database connect to.
I have a xml file which contains connectionstrings in format
</dbs>
<db code='xyz' value='full connection string'>
<db code='pqr' value='full connection string'>
<dbs>
this is the code which lives in HTTPREquest header.
SO the question is am i doing it in right way. or what is the best way to accomplish this task and optimize my code.
Reply
Answers (
2
)
Logging to different types - log4net
i wan to search file exist or not using textline ...