Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>There's an exe as part of VS2008 class SQLMetal.exe which does the important part of generating the DataContext.cs file. I think all you'd have to do is change the DBML file (it's a simple XML file), run SQLMetal (producing a .CS), and then run csc.exe (part of the .NET framework) to produce an Assembly (It'll be easier if you put the DataContext in an assembly by itself). This essentially boils down to option 2, but with far fewer files which need to be installed.</p> <hr> <p><strong>Update</strong>: Re-reading you question, I realize it's not the table names that changed, but the <em>database</em> name. This is a different problem (although the solution described above will work for that too).</p> <p>When VS2008 generates the DataContext class from the .dbml file, it creates two constructors: One which taken no parameters, and once which takes one string (plus a couple more ctors, which we can ignore). </p> <p>The zero parameter ctor uses the connection string you used when you created the dbml, which it then embeds in the resource file. This is an <em>incredibly</em> dumb design, and really should only be used for proof-of-concept code and demos. </p> <p>All real production code should use the ctor which takes a string -- specifically, the connection string --- which you should read out of the app.config file.</p> <p>This of course means the "correct" solution is option #1 -- rewrite the code at your office and re-deploy. It's a bother, but in the long run, it's for the best.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload