How to update DataContext based on changes in the database structure?
问题 I'm working in Visual Studio 2010 using linq-to-sql's DataContext which has several maps to tables in the database. Now when I change something to the structure of the database I noticed that the DataContext doesn't change and results in errors. The DataContext no longer corresponds with the structure of the database. I usually resolve this issue by deleting all table maps in the DataContext and drag&drop them again from the Database Explorer in Visual Studio. I just feel that this is very