简体   繁体   中英

In ASP.NET MVC 5, after i apply migrations for a change in MODEL class ,will it change my View .cshtml file as well?

I applied some changes in my student.cs (model) file and updated the database through migrations. But i need to see those changes in my view as well. Is it going to appear itself or do i need to a manually add those newly added values?

Migrations is not going to generate any code for you. If you're model changed, then Visual Studio's "Auto Rename" feature can update existing properties (provided you chose to do so). But other than, its not going to scaffold newer properties in the View automatically.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM