利用数据库中的数据渲染到视图
结果
添加数据到数据库
数据库
建表
model中添加数据
设置自己的controller和view
书写controller代码和view代码
添加到数据库并显示在视图
设置controler
设置view
遇到的bug
System.Data.Entity.Infrastructure.DbUpdateException HResult=0x80131501 Message=Unable to update the EntitySet 'Hell'
解决方案:设置主键,标识规范