4

My DBA decided to rename some fields in the database, so I refreshed my EF data context.

Now I'm wondering if I need to delete / re-create my controllers and views or if I can 'refresh' them without deleting (since I've made modifications to my controllers). Either option would be faster than hand editing in the changes, since there's quite a few.

Thanks for any advice.

4

1 回答 1

3

不幸的是,它不能……模型只能更新实体类,不能更新视图和控制器。

一个技巧可能是创建一个具有新名称的新控制器并保留旧控制器。然后,将这些重要代码从旧控制器复制到新控制器。

和视图的相同方法

于 2013-07-25T06:01:26.260 回答