I see a couple of DataContext connection string questions. I’m going to try to differentiate this one a bit:
-
How does one construct a generic connection string to a database, localhost | User-PC\User | Some database… (it is hosted/managed by Microsoft SQL 2008)
-
I notice that it is IDisposable. So if I have multiple users hitting my site, my code can only access the database one instance at a time, and has to wait until each instance is disposed, in order for the data to be consistent for each user?
-
Is it possible, by any chance, to somehow enable LINQ in F#-Interactive, and connect to the database from there? I cannot figure out how to enable/load the System.Data dll into fsi. Maybe that is unique to my installation, or it is a common thread? (ie, my installation also does not recognize windows.base.dll–I have to manually get it from programs\reference assemblies).
Anyhow, I’ve pretty much conclusively discovered that
let x = new System.Data.Linq.DataContext("localhost")
…does not work.
There actually is a somewhat generic way to construct a connection string: