摘要: 接下来我们研究一下在MVC中怎样运用模型来访问数据库。这里我们用Entity Framework来和数据库进行连接。添加模型类在模型文件夹右键选择添加然后选择类将类命名为Movie然后确定在Movie类中添加五个属性public class Movie { public int ID { get; set; } public string Title { get; set; } public DateTime ReleaseDate { get; set; } public string Genre { get; set; } public decimal Price { get; ... 阅读全文
posted @ 2012-12-23 00:38 terryxym 阅读(450) 评论(0) 推荐(0) 编辑