I use a 3 tier release system; alpha, beta and final. I'm using EF6 database-first approach to update my database model every time I make a change. Each release uses the same database, so the beta site is using the same data as the final release.

If I want to rename a table (and the related entity model) in my existing database, how would I allow the existing final release to continue working as normal (pointing to the old table name) and the beta release to point to the new table name?

有帮助吗?

解决方案

Create a View in your Datatabase:

CREATE VIEW [OldTableName] AS SELECT * FROM [NewTableName];
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top