views:

10

answers:

0

How would you go about automating the Migrations using SubSonic 2.2 with ASP.NET? Do I need to invoke a sonic.exe in a shell and then capture the results? That seems somewhat of a kludge.

My reason for attempting this is... my data structure contains a master table that automatically routes users to their correct company database. Each company has a schematically identical, but a physically separate database. I currently have this switching working nicely within the SubSonic 2.2 framework.

What I would like to see happen is that a user logs onto the program and their company database is automatically updated. Obviously, I will have to engage some sort of locking to ensure that the Migration isn't run simultaneously. How do I go about that with SubSonic 2.2? Is there anyway to access the sonic.exe tool without either having to command shell or rip the code out of the SubCommander source?