Why LINQ Sucks Today.
-
Brady Kelly wrote:
Natively it only has one 'join' operator, the equijoin, or inner join.
Nope, you just need to know how to do it. Tip:
DefaultIfEmpty()
xacc.ide
IronScheme - 1.0 RC 1 - out now!
((λ (x) `(,x ',x)) '(λ (x) `(,x ',x))) The Scheme Programming Language – Fourth Editionleppie wrote:
Tip: DefaultIfEmpty()
Not available in Entity Framework. I have been doing some homework. :)
-
leppie wrote:
Tip: DefaultIfEmpty()
Not available in Entity Framework. I have been doing some homework. :)
There, I fixed the subject. Do not curse my precious Linq2SQL :)
xacc.ide
IronScheme - 1.0 RC 1 - out now!
((λ (x) `(,x ',x)) '(λ (x) `(,x ',x))) The Scheme Programming Language – Fourth Edition -
There, I fixed the subject. Do not curse my precious Linq2SQL :)
xacc.ide
IronScheme - 1.0 RC 1 - out now!
((λ (x) `(,x ',x)) '(λ (x) `(,x ',x))) The Scheme Programming Language – Fourth EditionStill, Linq2SQL doesn't have an outer join operator. Full stop.
-
Still, Linq2SQL doesn't have an outer join operator. Full stop.
Brady Kelly wrote:
Still, Linq2SQL doesn't have an outer join operator. Full stop.
Yes, but I am sure with a little tweaking an OUTER JOIN can be emitted. To be honest, I dont even care about SQL syntax anymore, as long as LINQ spits out a minimum number of queries to get your data, then I am happy :) Sometimes to squeeze out the most, you will have to prepare some lookup queries ahead of time.
xacc.ide
IronScheme - 1.0 RC 1 - out now!
((λ (x) `(,x ',x)) '(λ (x) `(,x ',x))) The Scheme Programming Language – Fourth Edition -
Brady Kelly wrote:
Still, Linq2SQL doesn't have an outer join operator. Full stop.
Yes, but I am sure with a little tweaking an OUTER JOIN can be emitted. To be honest, I dont even care about SQL syntax anymore, as long as LINQ spits out a minimum number of queries to get your data, then I am happy :) Sometimes to squeeze out the most, you will have to prepare some lookup queries ahead of time.
xacc.ide
IronScheme - 1.0 RC 1 - out now!
((λ (x) `(,x ',x)) '(λ (x) `(,x ',x))) The Scheme Programming Language – Fourth EditionSeeing as this is a paying job, and I want to drink beer, I have opted for a SQL view to provide the left join. Pragmatism sub-queries FTW! :cool:
-
Seeing as this is a paying job, and I want to drink beer, I have opted for a SQL view to provide the left join. Pragmatism sub-queries FTW! :cool:
Brady Kelly wrote:
I have opted for a SQL view to provide the left join.
You are lucky. Our whole DB has to stay SQLCE compatible, no views, SP's or functions.
xacc.ide
IronScheme - 1.0 RC 1 - out now!
((λ (x) `(,x ',x)) '(λ (x) `(,x ',x))) The Scheme Programming Language – Fourth Edition -
Natively it only has one 'join' operator, the equijoin, or inner join. A left or right join requires a subquery, and I don't want (today) to contemplate a full outer join.
Having to contemplate joins might be considered another negative aspect.
Personally, I love the idea that Raymond spends his nights posting bad regexs to mailing lists under the pseudonym of Jane Smith. He'd be like a super hero, only more nerdy and less useful. [Trevel]
| FoldWithUs! | sighist | µLaunch - program launcher for server core and hyper-v server -
Brady Kelly wrote:
I have opted for a SQL view to provide the left join.
You are lucky. Our whole DB has to stay SQLCE compatible, no views, SP's or functions.
xacc.ide
IronScheme - 1.0 RC 1 - out now!
((λ (x) `(,x ',x)) '(λ (x) `(,x ',x))) The Scheme Programming Language – Fourth EditionTurns out I couldn't use a view, or only use an unnecessarily complex view, so I subquery the value lists for later aggregation.
-
Having to contemplate joins might be considered another negative aspect.
Personally, I love the idea that Raymond spends his nights posting bad regexs to mailing lists under the pseudonym of Jane Smith. He'd be like a super hero, only more nerdy and less useful. [Trevel]
| FoldWithUs! | sighist | µLaunch - program launcher for server core and hyper-v serverSo true.
-
Natively it only has one 'join' operator, the equijoin, or inner join. A left or right join requires a subquery, and I don't want (today) to contemplate a full outer join.