Taha Rehman Siddiqui
Taha Rehman Siddiqui

Reputation: 2533

Changing Schema Names of all tables in EDMX

I recently moved all the tables in SQL Server to a new schema, lets say XYZ. Now I want to update my edmx, to refer to tables that are under new schema XYZ. How do I do that? All it allows me currently is to add all the tables from the XYZ schema to the edmx.

Upvotes: 3

Views: 955

Answers (1)

AakashM
AakashM

Reputation: 63338

A little-known fact is that the edmx file is xml and so can be edited as text, as well as using the designer tool.

In Visual Studio you can right-click it in Solution Explorer and choose Open With... to get to the xml. Once in there, search for Schema= and you will find the section with all the database table references. Change these as required and save.

Upvotes: 3

Related Questions