0

I'm working on a project that is using linq to sql. In my model folder I have 4 files:

model.csdl
model.edmx
model.msl
model.ssdl

But that model is out of date with the current database.

I'm wondering how I can update the model, via an automate process (if possible).

And also I'm wondering how I can generate those files. I can create an .edmx file via add => new item => ADO.NET Entity Data Model. But I don't know how to create the other files.

Thanks in advance.

Bruno

Jonathan
  • 11,809
  • 5
  • 57
  • 91
bruno
  • 1,830
  • 2
  • 22
  • 36

2 Answers2

3

Double click the .edmx file to open the designer. In the middle of the designer, right click to show the contextual menu and click "update model from database". It will prompt a screen, check the DB parameters and click next. Now, you're in a sreen with TABS. The second tab will its for update the model. Select the tables and views you need to update and click next. That's all.

Jonathan
  • 11,809
  • 5
  • 57
  • 91
  • Thanks for your answer. This worked. Founded also once I knew it was EF. But I had some troubles with it because the dev who made the project did some strange stuff to let it work. Now it's completely solved :-) – bruno Mar 22 '11 at 07:50
  • can we generate .csdl .ssdl .msl files frm dbcontaxt not using edmx models, while working as code first. – sairfan Sep 19 '18 at 15:38
1

This is not Linq2SQL, this is Entity Framework.

with Linq2SLQ you can create the mapping with SqlMetal or with the Linq2Sql Desinger. EF has other tools and other Designers.

Arthur
  • 7,939
  • 3
  • 29
  • 46