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

 EF的优点之一在于我们得实体模型不用匹配存储模型

Entity Spliting

实体拆分就是将一个实体进行配置后,映射后会在数据库中生成多张表

来个类,里面包含图书和水果的属性

public class Model1
    {
        public string Model1Id { get; set; }
        public string FruitName { get; set; }
        public decimal FruitPrice { get; set; }
        public string BookName { get; set; }
        public decimal BookPrice { get; set; }
        public DateTime AddTime { get; set; }
    }
View Code

相关文章:

  • 2022-12-23
  • 2021-11-29
  • 2021-11-17
  • 2022-12-23
  • 2022-12-23
  • 2022-01-10
  • 2022-01-31
猜你喜欢
  • 2022-02-21
  • 2022-02-27
  • 2022-02-17
  • 2021-06-27
  • 2022-12-23
  • 2022-12-23
  • 2021-08-09
相关资源
相似解决方案