2013年8月20日
摘要: 在Code First中使用Migrations对实体类和数据库做出变更,Mirgration包含一系列命令。 工具--库程序包管理器--程序包管理器控制台 运行命令:Enable-Migrations启用Code first Migration 运行成功后会产生两个类:Configuration.cs 和_InitialCreate.cs,这是一个用时间戳作为前缀的类。如201212310201487_InitialCreate.cs 然后更改实体类Blog,增加一个属性Url public class Blog { public int BlogId { get; s... 阅读全文
posted @ 2013-08-20 10:54 cw_volcano 阅读(317) 评论(0) 推荐(0) 编辑