How to 'LOCK' a Linqpad script with a Linqpad Connection - so that the Linqpad script will work with only one connection -


how 'lock' linqpad script linqpad connection - linqpad script work 1 connection.

when run linqpad script - make sure 1 connection work

if linking sql database, throw exception if connection.database or connection.datasource not expect.

eg

   if (!(this.connection.database  .equals(database , stringcomparison.currentcultureignorecase)) ||         !(this.connection.datasource.equals(sqlserver, stringcomparison.currentcultureignorecase)))            throw new exception(string.format("this script applies database {0} on {1}", database , sqlserver));      

if linking other sql, may need check this.connection.connectionstring expect.


Comments

Popular posts from this blog

shopping cart - Page redirect not working PHP -

php - How to modify a menu to show sub-menus -

python - Installing PyDev in eclipse is failed -