Link to home
Start Free TrialLog in
Avatar of jherington
jherington

asked on

Update Linq .dbml schema in VS2008

Hello,
I am trying to update the Linq schema within VS2008 - when I make changes to the underlying Sql database. I have tried using SqlMetal but if I replace the existing .dbml file in my project with the SqlMetal .dbml file I get an error pointing to the layout file. If I delete the layout file, I am then able to open the new .dbml in VS file but there is no longer a valid datacontext - there all code that was depending on this Linq datacontext fails regardless if I rebuild the solution.

Here is the current SqlMetal command line (which seems to work fine?):
sqlmetal.exe /conn:"server='itsa1'; database='myinsbusiness'; user='admin'; password='password'" /dbml:"C:\Program Files\MyInsBusinessFetch\SqlData\MyInsBusiness_LinqDB.dbml" /sprocs /views

So my question is how do rebuild my .dbml to use within VS2008?
ASKER CERTIFIED SOLUTION
Avatar of naspinski
naspinski
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jherington
jherington

ASKER

Thank you. The link lead me to several other links that should prove to be very helpful. I am still somewhat confused...would the dbContext.cs file in your example in effect replace the dbml, layout and designer files?
Can anyone help me further with this?  I'm unsure how to use the sqlmetal application as naspinski has shown.  I too tried to use it as jherington and experienced the same result.

Regards,

Ady