Update XSD file when changing SQL server schema in VS2010

I have what seems like a simple problem, but I can't figure out how to get VS2010 to update my .xsd file when the schema changes in my SQL Server database.

So far I have found two recommendations.

First right-click the xsd file and run the custom tool. This does not update the XSD, as far as I can tell, since my added table is not displayed, and the table with the new column is not updated.

The second option is to delete the xsd file, and then re-add the data source. This method obviously updates the tables, but any queries that I added for the user interface are lost.

Since this is a fairly large data model, I expect changes to the schema (we are still at an early stage). At the moment, it seems that my only right will be to transfer my user queries to this database, since functions are stored in procedures ...

Is there any best practice for this (or something that I'm terribly lacking in this toolbox)?

+4
source share

All Articles