要专业系统地学习EF前往《你必须掌握的Entity Framework 6.x与Core 2.0》这本书的作者(汪鹏,Jeffcky)的博客:https://www.cnblogs.com/CreateMyself/

Table Per Hierarchy(TPH)

Table Per Type(TPT)

Table Per Concrete class(TPC)

我弄一下一,发现这些东西我几乎没用过上几篇我写了BaseEntity,但按照我学的这些东西来看,这个不叫继承

TPH

代码一贴你就能知道怎么回事

基类BaseEntity

public class BaseEntity
    {
        public string Id { get; set; }
        public DateTime AddTime { get; set; }
    }
View Code

相关文章:

  • 2021-11-14
  • 2021-06-11
  • 2021-09-26
  • 2022-12-23
  • 2021-07-25
  • 2021-06-10
  • 2021-08-30
猜你喜欢
  • 2021-06-04
  • 2022-12-23
  • 2022-12-23
  • 2021-11-24
  • 2021-08-26
  • 2021-06-22
相关资源
相似解决方案