首页 > 解决方案 > 两边匹配列有不同存储类型时无法翻译集合操作

问题描述

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();

标签: sqllinq

解决方案


推荐阅读