sql - 两边匹配列有不同存储类型时无法翻译集合操作
问题描述
var dbHold1 = _context.CompanyDirectorSh.Select(x => new { x.Shareholderid, Fname= x.Fname, Lname = x.Lname , x.Cmpid })
.Union(_context.CompanyNonDirectorSh.Select(x => new { x.Shareholderid, Fname = x.Fname , Lname = x.Lname , x.Cmpid }))
.Union(_context.CompanyAnotherCompany.Select(x => new { x.Shareholderid, Fname = x.ExecuterFname , Lname = x.ExecuterLname, x.Cmpid }))
.Where(x => x.Cmpid == companyId).ToList();
解决方案
推荐阅读
- c++ - 应使用或不使用条件变量来减少错过的唤醒
- excel - 使用现有名称保存并关闭工作簿,然后使用 VBA 重新打开它
- python - 使用条件 Pandas 对两列进行自定义排序
- create-react-app - 我无法启动反应应用程序项目
- pdf - 参数类型'Future
' 不能分配给参数类型 'Widget'.dart - php - 为什么 PHP mail() 给我错误:“未定义的偏移量:3”,原因是什么?
- linux - 如何区分 yum 全新安装和 yum 更新?
- enums - 为什么将一个枚举变体设为“f64”会增加此枚举的大小?
- java - 在 Android 通知设置期间显示两次 Toast 消息
- jquery - 为什么 .data() 和 .attr() 返回 undefined 虽然数据属性名称匹配?