Comments (1)
在6.4.7中我测试可以支持EF的TPT模式,也就是Company建表子表外键指向Company分别建立Manager和Worker,只需要在基类指定下Table的名称,并且在子类也指定Table名称就可以实现继承关系,然后DataContext分别构建DbSet。
如果只是抽象类而不需要建表的的话,指定Table一致或者不填写的话应该默认采用TPH模式,子类和父类在同一张表,可以参考看看FrameworkUser的实现过程
[Table("SpaceBasics")]
public class SpaceBasic : BasePoco
{
[Display(Name = "名称")]
public string Name { get; set; }
}
[Table("Seats")]
public class Seat : SpaceBasic
{
}
public DbSet<SpaceBasic> SpaceBasics { get; set; }
public DbSet<Seat> Seats { get; set; }
public DbSet<Area> Areas { get; set; }
from wtm.
Related Issues (20)
- FrameworkUserBase 类应继承 PersistPoco 而不是 BasePoco
- Excel導出日期條件不生效 HOT 1
- 解决下上传问题吧? 没提交 选择文件--就已经自动上传了-- 选择错文件也上传 造成很多垃圾文件 测试版本LayUI HOT 1
- 关于最后修改时间 HOT 2
- LayUI生成的菜单管理重复了
- 如何在有继承的类里面初始化DataContext
- 多语言好像某些KEY键值没有完善,推荐下工具您检查下与完善.
- 登陆接口有严重级问题 账户区分大小写? 异常未处理.
- 期待新功能:啥时候 WTM 能进入分布式 云时代啊.
- LayUI 英文环境语言下 表格显示 UI有些错位.看下啥问题. HOT 1
- 租户号参数缺失BUG引发问题. HOT 1
- 一对多 Model文件放到不同类库中引发 The XXX field is required.问题 HOT 1
- 建议:调试模式 反射所有controller下的Index方法作为左侧菜单 希望能排序
- Microsoft TrueType Core Fonts
- 关于pgsql 时间戳的问题 HOT 1
- 6.5.0下的部门管理中的新增功能排序混乱
- WTM文档中的模型层创建模型里的TreePoco无法正常使用
- 系统自带的代码生成器无法正确识别所选实体类型
- Workflow运行时部分情况无法正确读取Model的Property HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wtm.