ASP.NET MVC EF 链接数据库(二)-----Model First

Model first (VS2015 ,Sql Server2014)
新建MVC项目
 
 
右键product ,新增标量属性(数据库表中的字段)
 
Ctrl + S 保存页面,右键“根据模型生成数据库”
 
实例:
 
 
 
源码地址:http://note.youdao.com/noteshare?id=f09484de58f75bf07cc3667eb4b248cc
 
 
 

原文出处:https://www.cnblogs.com/om88mo/p/10941859.htmlhtml