Hi Support team
i have problem when use cross join in linq
let say:
In database we have 1 record in Comments and the comments have 2 records (files) in Files reference to this comment
and i use this query
var query=
from c in WorkScope.All<Comments>().Where(x => x.Id == id)
join status in WorkScope.All<APStatus>() on dec.APStatusId equals status.Id
join file in WorkScope.All<Files>() on c.Id equals file.CommentId into files
select new
{
CommentId = c.Id
Name = c.Name,
Content = c.Content,
Files = files,
Status = status.Name
};
var result = query.ToList();
and the result return 2 records, both of them have the same CommentId, Name, Content, Status but the Files have follow value [file1], [file2]
The expect result have to return only 1 record with Files is [file1, file2]
Do you have any suggestion on this?
Thanks
Cross join have problem
Re: Cross join have problem
Hi Shalex
Thanks for your answer
i used devart version 9.6.597 and we got problem with cross join
this is very critical bug.
Could you please check?
Thanks
Thanks for your answer
i used devart version 9.6.597 and we got problem with cross join
this is very critical bug.
Could you please check?
Thanks
Re: Cross join have problem
Upgrade to v9.6.646.
If this doesn't help, please send us a small test project with the corresponding DDL/DML script for reproducing.
If this doesn't help, please send us a small test project with the corresponding DDL/DML script for reproducing.