Get access to connection string passed in by runner in C# Migration #240

dnajd opened this Issue Feb 8, 2012 · 5 comments


None yet

4 participants


I have some migrations that are seeding data with NHibernate.
My nant scripts are passing the appropriate connection string to the runner.

Can my C# code in a Migration, being run by the nant migration task, get the connection string that was passed to the runner and pass it along to nhibernate?



Right now, the connection string is not exposed in the migration. But it wouldn't be too hard to change that.

Anyone got an opinion on this?

dgg commented Feb 6, 2013

I am also using NHibenate inside some of the migrations and I would love to be able to access the connection string passed by the runner. Right now I am using the ApplicationContext to pass the connection string (again).


Ok, I'll fix that.


That sounds good, thanks!


Closed by pull #414

@tommarien tommarien closed this May 24, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment