Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6811301
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T20:18:38+00:00 2026-05-26T20:18:38+00:00

I am currently working on a ASP .Net MVC 3 application to do some

  • 0

I am currently working on a ASP .Net MVC 3 application to do some database manipulations on a specific set of Metadata tables in a database. I’ll basically be doing inserts, updates deletes etc. from the application. However, the aim is to migrate these Metadata tables across different databases (and most likely servers as well) so that we can use the same Methodology across clients.

Right now I am using Linq2Sql to generate my ORM around these specific metadata tables. The aim is to use the same application to manipulate the data across servers and databases. What is the best practice/approach for this?

The simplest solution that I’ve thought of is a constructor for my DataContext where I could use user input (server + database name +userID +password) to manipulate a connection string and pass it into my DataContext. Since the Framework should be the same across all databases and servers, this should work in theory. However, I’m not where the best place to maintain the modified connection string is (The session? a cookie?).

What is the best practice around this kind of server/database switching in a .Net app?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T20:18:39+00:00Added an answer on May 26, 2026 at 8:18 pm

    You’re going down the right path by passing the connection in the constructor for the context. As for maintaining the connection string, I suspect that would depend on how you are managing the other site information for your various sites. If you are managing that in a central database, save the site specific value in that central database and use the same persistance you are using for those site settings while the user is visiting your site. Just make sure not to pass server specific information to the client (thus a cookie would not be the recommended approach).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

First some background, I am currently working on a relatively large Asp.Net MVC application
Currently I am working on small application in asp.net mvc. It is a some
I'm currently working on an Asp.net MVC Web application. In my solution, there're two
I am currently working on my first asp.net mvc application. I am trying to
I'm currently working on a blog application in ASP.NET MVC. I can't quite figure
i am working on an asp.net MVC web application , currently i am managing
I'm currently working on an Intranet application project, using ASP.NET MVC 3. One of
Currently working on an ASP.NET MVC 3.0 application and using FormsAuthentication . When the
I'm currently working on an asp.net-mvc content management system. It would be incredibly useful
I am currently working on an asp.net application in Visual Studio 2005. I would

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.