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 3977660
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T04:57:00+00:00 2026-05-20T04:57:00+00:00

Brief introduction: I have this ASP.NET Webforms site with the particularity that it doesn’t

  • 0

Brief introduction:
I have this ASP.NET Webforms site with the particularity that it doesn’t have only 1 database, it has many.
Why? Because you can create new “instances” of the site on-the-fly. Every “instance” share the same codebase, but has its own database. These all databases have the same schema (structure) but of course different data. Don’t ask ‘why don’t you put everything in one database and use InstanceId to know which is” because it’s a business policy thing.

The application knows which instance is being requested because of the url. There is one extra database to accomplish this (I do know its connection string in design time). This database has only 2 tables and associates urls to ‘application instances’. Then, of course, each ‘application instance’ has its associated connection string.

Current situation: There is nothing being used right now to help us with the job of mantaining every instance database in sync (propagating schema changes to every one). So we are doing it by hand, which of course it’s a total mess.

Question: I’d like to use a rails-migration way to handle schema changes, preferably migratordotnet, but could use any other if it’s easier to setup.

The problem is that migratordotnet needs the connnection string to be declare in the proj.build file and I don’t know them until runtime.

What it would be REALLY useful is some kind of method running on Application_Start that applies the latest migration to every database.

How could this be done with migratordotnet or any similar? Any other suggestion is thanksfully welcomed.

Thank you!

  • 1 1 Answer
  • 1 View
  • 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-20T04:57:00+00:00Added an answer on May 20, 2026 at 4:57 am

    Since this is an old question, I assume that you have solved the problem in some manner or another, but I’ll post a solution anyway for the benefit of other people stumbling across this question. It is possible to invoke MigratorDotNet from code, rather than having it as an MSBuild target:

    public static void MigrateToLastVersion(string provider, string connectionString)
    {
        var silentLogger = new Logger(false, new ILogWriter[0]);
        var migrator = new Migrator.Migrator(provider, connectionString, 
                       typeof(YourMigrationAssembly).Assembly, false, silentLogger);
        migrator.MigrateToLastVersion();
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I received a brief introduction to ASP.NET MVC in school and I am trying
brief overview so this is in context, I have an application in java that
Here's a brief rundown of my issue: I have a JavaScript function that gets
There's only a brief introduction to Chameleon Template in document of pyramid. Any detailed
brief history. I have a little reporting tool that I am creating that uses
Brief blurb, My skill in .net has been called innovative but I would prefer
Brief Description of the app: I have written a Delphi application that allows a
I am reading this bison introduction. I have two questions and it will be
Brief Description: I have a table that stores articles. Articles are listed on table
I'm designing an application that will use Oracle , and we have this department

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.