摘要: 数据注解:配置选项的子集;Fluent API包含所有选项 System.ComponentModel.DataAnnotations Attributes: System.ComponentModel.DataAnnotations.Schema Attributes: AttributeDesc 阅读全文
posted @ 2017-03-28 22:55 蓝平凡 阅读(820) 评论(1) 推荐(1) 编辑
摘要: Code First中有三种不同的方法表示继承层次关系 1.Table per Hierarchy (TPH): 这种方法建议用一个表来表示整个类的继承层次关系,表中包含一个识别列来区分继承类,在EntityFramework中,这是默认的实现 类与数据库表的映射最简单的策略应该是:每个持久类对应一 阅读全文
posted @ 2017-03-28 00:53 蓝平凡 阅读(2432) 评论(0) 推荐(2) 编辑