Bright Leopold

i come from the other world,i will go back after the love,the regret,the alive and the dead are over

导航

2014年6月18日

EF4.1DbContext使用现成的数据库

摘要: 在配置文件中使用 标记name=BlogDB的连接字符串然后在DbContext的子类中使用public class BlogDbContext : DbContext { public BlogDbContext() : base("na... 阅读全文

posted @ 2014-06-18 22:37 Bright Leopold 阅读(248) 评论(0) 推荐(0)

EF4.1使用

摘要: EF分为三类:db first:首先建立数据库,然后通过ADO.Net Entity Data Model项目建立.edmx文件,这是一个xml文件主要作用就是映射类和数据表model first:首先建立.edmx文件,映射类和数据表的关系,然后生成代码code first:首先写代码,如实体对象... 阅读全文

posted @ 2014-06-18 22:33 Bright Leopold 阅读(207) 评论(0) 推荐(0)