C# – keep LinqToSQL sync with the database

.net-3.5c++linq-to-sqlvisual-studio-2008

I am going to develop a new website with asp.net 3.5 and LinqToSQL. For maintainability purposes, how can I modify a Linq class if an attribute is added to a table in the database ?

Thank you.

Best Solution

Unfortunately LinqToSQL does not have synchronization support in Visual Studio. The options are:

  1. Remove the table and add it again. Of course any customization changes are lost
  2. Edit the .dbml file file directly and add the attribute. The file has xml content and when saving it will regenerate the .cs file.
  3. Use 3'rd party addins like: