我想得到一个;一个人拥有的所有亲属的分隔字符串。涉及四个表:
USERTAB PERSON PERSON_RELATION RELATION_TAB
询问
from u in USERTAB
select new
{
Person = from p in PERSON where p.USERID == u.USERID
select new
{
PNo = p.NO,
Name = p.NAME
Relatives = (from r in PERSON_RELATION where r.PSEQ == p.PSEQ select new
{
Description = (from rel in RELATION_TYPE where rel.TYPE_SEQ == r.TYPE_SEQ select rel.DESCRIPTION).ToArray() //(or also tried .ToString())
})
}
}
我希望描述字段是“;” 用户(人)拥有的所有亲属的分隔列表。
在我的 Relatives 对象上使用 ToString 它只会在运行时失败。LINQ to Entities 无法识别方法“System.String ToString()”方法
示例:描述 =“父亲、兄弟、表弟”