why LINQ 2 SQL sometime add a field like select 1 as test, others valid fields....
Posted
by Fredou
on Stack Overflow
See other posts from Stack Overflow
or by Fredou
Published on 2010-04-21T18:46:54Z
Indexed on
2010/04/21
19:43 UTC
Read the original article
Hit count: 198
linq-to-sql
I have to concat 2 linq2sql query and I have an issue since the 2 query doesn't return the same number of columns, what is weird is after a .ToList() on the queries, they can concat without problem.
The reason is, for some linq2sql reason, I have 2 more column named test and test2 which come from 2 left outer join that linq2sql automatically create, something like "select 1 as test, tablefields"
Is there any good reason for that? how to remove this extra "1 as test" field?
here a few of examples of what it look like: google result for linq 2 sql "select 1 as test"
© Stack Overflow or respective owner