Home Dashboard Directory Help
Search

Linq for SQL designer support for refresh/resync of tables and columns by pwelter34


Status: 

Closed
 as Won't Fix Help for as Won't Fix


62
1
Sign in
to vote
Type: Suggestion
ID: 260723
Opened: 3/1/2007 8:27:35 AM
Access Restriction: Public
4
Workaround(s)
view

Description

The Visual Studio Linq for SQL designer does not support refreshing tables and column information from the database. By refreshing I mean syncing the table in the designer with the database. The refresh should look for things like new or removed columns, changed data types and new indexes and foreign keys. You should be able to right click on a table and select refresh. You should also be able to select just a column and select refresh to be more granular.
Details
Sign in to post a comment.
Posted by dasiths on 10/8/2009 at 5:06 PM
Atleast issue a one way sunc feature from the db->dbml. When did someone actually get the data model right on the first go. It's like owning a American Muscle car. Great fun to drive but doesn't work in the real world.
Posted by Simo on 8/22/2009 at 1:21 PM
+1 for this feature. I Just can't see how LOB .net developers are going to be using Linq-to-Sql classes without it,
Posted by M O J O on 2/13/2009 at 3:41 AM
Until this feature is implemented, Linq to SQL is meaningless ... just to much work to do to refresh the scheme. I would LOVE to use it, but with all my tables (and changes going on), this is too much work.

Microsoft I have NO CLUE why you didn't implement a "refresh" .. at least a one way sync from DB til VS.

Hmmmm.
Mojo
Posted by KristoferA - Huagati Systems on 1/1/2009 at 10:20 PM
@MattO2: because they are not planning to add that functionality. Meanwhile, there are third party solutions that adds this functionality to VS2008: http://www.huagati.com/dbmltools/
Posted by Matt Olson on 12/31/2008 at 8:05 AM
Why is this marked as "Closed" (Won't Fix?)
Posted by KristoferA - Huagati Systems on 7/27/2008 at 8:40 PM
I have written an add-in for Visual Studio that updates the DBML with db schema changes.

http://blog.huagati.com/res/index.php/2008/07/07/tools-part-1
Posted by Galabar0001 on 3/3/2008 at 3:19 PM
This feature is extremely important for anything other than a very small project. Having to reset auto-sync/auto-generated properties, enum class names, etc. for each sync is unfortunate.
Posted by Sharbel on 2/16/2008 at 1:50 PM
Seriously, how the heck did MS miss this feature? In a perfect world, I would be able to map out a db table with every column that is needed and my clients would never ask for another column when we present a prototype version of the app, but every here knows that it happens all the time! So, currently I have to remove/add the table back in the designer? It's just silly, and quite frankly goes against all the convenience that LINQ offers us.

Please add this or provide some ghetto work-around for us to implement until its done right.
Posted by RyanFinken on 1/17/2008 at 11:39 PM
This is a critical feature, and I hope they develop a solution soon.
Posted by savanna on 12/19/2007 at 10:47 AM
I am looking for this feature after playing with LINQ to SQL for 20 min too. I am really disappointed that MSFT missed such an essential feature.
Posted by mike_b on 9/11/2007 at 3:38 PM
Well, after using dlinq for precisely 20 minutes I realized that I REALLY needed this feature and went looking for it only to discover that it's not there. Do the people at MS actually use linq, because this is a pretty basic feature. Almost unusable without it. Replacing the tables on the designer every time is a marginal solution and overwrites changes you might have made to the properties of the associations.
Posted by Martin Schönholzer on 9/5/2007 at 7:32 AM
I didn't suspect such a response from ms.
I'm really disappointed about that.
What's the whole point of asking for feedback and then leave out support for such an essential
part of a product?

Linq to SQL will be a joke without such a feature...
Posted by Rohland on 8/28/2007 at 8:07 AM
Agreed, I cannot believe this has been left out? I doubt there has ever been a case where a project has started and finished with the data model created at the design phase. Removing and adding the entity again is a hack.
Posted by HowardRichards on 8/11/2007 at 1:57 AM
Looks like Linq to SQL goes in the "would have been great if they'd thought it through" pile of unusable features then.

My DB has 120 tables - cannot keep rebuilding that diagram, especially since the views would need to be rebuilt.

Plus Linq to SQL has no extensibility for implementing app-level security - that has to be implemented by the app by creating another layer above LINQ - making it almost impossible to use LINQ queries on the original objects. So easier by far to dump LINQ to SQL and rewrite it yourself!
Posted by MoInam on 8/7/2007 at 11:50 PM
A two-way sync'ing would have been perfect.

minam
Posted by pwelter34 on 4/6/2007 at 10:28 AM
Hi,

I thought about writing an add-in to do this. My approach would be to update the dbml file. I ran into a couple of issue when looking into this. First, there doesn’t appear to be any public API/object model for the dbml file format. This can be solved by creating my own, but it would be really nice to have a API be public. Second, the designer seems to output some the attributes in a proprietary manner. The PropertyType attribute is one of them. It’s value looks something like this AAEAAAD/////AQAAAAAAAAA… If it weren’t for the proprietary attribute values, it wouldn’t be too hard to create an add-in to update the model. Is there some way to generate that value, is it some sort of hash?

~ Paul
Posted by Microsoft on 4/6/2007 at 10:02 AM
Hello,

Thanks for your suggestion on enabling schema-sync on the O/R Designer. Unfortunately, we won't be able to include schema-sync feature in Visual Studio "Orcas". We are considering different ways to provide schema-sync capability in later releases. Please feel free to make more suggestions on schema-sync feature or any other aspects of the O/R Designer.

Young Joo
Program Manager
Visual Basic
Sign in to post a workaround.
Posted by Fahad349 on 4/4/2012 at 11:06 AM
My bad, I just found out that Huagati works; but VS 2010 layout viewer does not show the relationship lines right away. The updates can be verified by looking at designer.cs file.
Posted by Fahad349 on 4/4/2012 at 7:42 AM
Huagati tool does not work. I already tried a simple update by adding column to my database and refreshing the dbml using huagati.
Posted by KristoferA - Huagati Systems on 9/29/2008 at 7:52 PM
Third party workaround:

http://www.huagati.com/dbmltools/
Posted by Damden on 3/11/2008 at 3:00 AM
I found a workaround by Petar Vucetin on:
http://blogs.vertigo.com/personal/petar/Blog/Lists/Posts/Post.aspx?ID=11

The only disadvantage of this workarround is that the whole database is refreshed, and NOT only the 'objects' used in your linq diagram.

P.S. make sure to save the .cmd file in ansi/ascii format, otherwise it won't work properly.