I HATE linq, edm and microsofts bullpatty datastruct

I HATE linq, edm and microsofts bullpatty datastruct

Post just about everything that isn't directly related to Spring here!

Moderator: Moderators

Post Reply
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

I HATE linq, edm and microsofts bullpatty datastruct

Post by smoth »

I just wanted to say that.
User avatar
oksnoop2
Posts: 1207
Joined: 29 Aug 2009, 20:12

Post by oksnoop2 »

Image
User avatar
Wombat
Posts: 3379
Joined: 15 Dec 2008, 15:53

Post by Wombat »

Image
User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Post by Pxtl »

.... God Smoth, you should see my twitter feed. For a period of months it was nothign but raeg comments about EDM.

ESQL, to me, is an admission that the whole "compile LINQ into SQL" thing was a leaky, nasty mess. I was actually using EDM 3.5, which really should've been called "EDM leaked pre-alpha pseudo-release".

Meanwhile, at work we use the wonderfully deprecated Linq2SQL which has wonderful failures like being unable to write a "union all" SQL statement without nightmarish workarounds.

The only good thing to come out of linq were the peripheral language features in 3.5 added to support it like type inference, lambdas, anonymous types, and the various ienumerable functional-programming extensions for writing FP-style queries.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Post by smoth »

I just want to go back to writing sql queries and datasets man. I don't remember them being THIS much of a hassle.
User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Re: I HATE linq, edm and microsofts bullpatty datastruct

Post by Pxtl »

So what's getting your goat right now? Failures in updating the entity model? Confusing complaints when you try to update an object back to the database? Super-long dynamic compiles resulting in simple queries with lots of pre-fetching taking 6 minutes? SQL translation failures? Linguistic challenges of "I know how to do this in SQL, how the hell do I do it using LINQ?"

The approach I tried to take with EDM was to bolt the logic right onto all the classes. The EDM classes are all partial, so you can add custom properties and methods to them. The problem with that is it meant I was using all the EDM objects *directly*, pulling down a graph of objects from the database instead of a simple list of rows. This is great for having a single unified model in both client and database... but it meant a *lot* of joins, or a *lot* of lazy loads, either one the Entity framework would crap its pants at. There's no way to say "load these related entities and all their related entities along relationships X, Y, and Z" when you have an existing graph of objects and you want to expand it with more stuff from the DB. You can only either fetch X relationships from the database when getting fresh objects, or fetch them one relationship at-a-time.

Near as I can tell, the intended use of these things is to use it *just like SQL*, but with more pain. Trying to use it to code OO database stuff is just agony.
Post Reply

Return to “Off Topic Discussion”