惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

The GitHub Blog
The GitHub Blog
Martin Fowler
Martin Fowler
Vercel News
Vercel News
U
Unit 42
Engineering at Meta
Engineering at Meta
aimingoo的专栏
aimingoo的专栏
MyScale Blog
MyScale Blog
Y
Y Combinator Blog
阮一峰的网络日志
阮一峰的网络日志
爱范儿
爱范儿
Apple Machine Learning Research
Apple Machine Learning Research
博客园_首页
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
B
Blog RSS Feed
N
Netflix TechBlog - Medium
GbyAI
GbyAI
F
Fortinet All Blogs
MongoDB | Blog
MongoDB | Blog
大猫的无限游戏
大猫的无限游戏
C
Check Point Blog
M
MIT News - Artificial intelligence
D
Docker
IT之家
IT之家
Stack Overflow Blog
Stack Overflow Blog

博客园 - lgzh

spring boot 调用python ,研发环境下AttributeError: module 'clip' has no attribute 'load' el-tree选中背景变色 jquery datatable分页 png 变透明 读取文件不是真实的具体路径 setZh.ini win10 开发mfc 64位 ocx控件 win7 下加载MSCOMCTL.OCX getGLES1ExtensionString: Could not find GLES 1.x config! IUnknown(TVarData(Params[0]).VPointer) as Range win8 VB6打开提示MSCOMCTL.ocx未注册 js 动态添加行,删除行,并获得select中值赋予 input SQL Server 自定义函数 返回树结构函数 .net 安装包制作 大图 预览 android 创建数字签名应用程序 android java.net.socketexception permission denied an error occurred while signing: '.', hexadecimal value 0x00, is an invalid character IIS配置、403.6 无权查看,网页拒绝访问 C#后台调用Delphi 的Ocx
Code First 不自动生成数据库
lgzh · 2018-04-04 · via 博客园 - lgzh

工具--〉程序包管理器控制台

k1. 启用迁移: Enable-Migrations

    Enable-Migrations -ContextTypeName Mvc4WebSite.Models.MvcGuestbookContext

    迁移 Mvc4WebSite项目下的MvcGuestbookContext。迁移成功提示:已为项目 Mvc4WebSite 启用 Code First 迁移。

2. 添加迁移: Add-Migration

    Add-Migration InitialCreate

3. 将迁移更新到数据库:Update-Database

    Update-Database -Verbose

这样,就完成了更新数据库