Edentity Web Systems
You solve creative. We crack code.
/Header/WhoWeAre.jpg
 

04/06/2009 LINQ-SQL: Why I Love it and Why I Hate it
Posted by Joel Varty

Love it:

  • Generate a class structure based on database tables.
  • Makes coding transactions really easy and seamless.
  • Makes working with store procedures more like methods.
  • Makes it easier to validate database field names at compile-time.

Hate it:

  • Object must be “attached” and “detached” in different situations.  This is silly.  We should be able to get an object, pass it any tier of the app and attach it to any DataContext more easily.  We should NEVER have to leave the DataContext object open.
  • Order of operations: if I call a Delete and then an Insert, the generated SQL may not be in that order.  That’s nasty.
  • Too easy to use:
    • This should be a love it, but is more of a hate it, since now I have to police my developers to make sure they aren’t writing inadvertent database queries that are nasty.  I guess they could always do this, but now it’s even easier, so it happens more often.
  • Mass delete/update operations: the dynamic sql for this is nasty.  You need to write a stored proc or your own dynamic sql to make this efficient.
  • Temp table handling in stored procs.  Stored procs that use temp tables don’t work worth a hoot.  This stinks.
  • It’s slower than traditional database querying.  Mind boggling.  I hope it gets a performance boost in 4.0.

I have lots of others love/hate things for LINQ-SQL, but these are the ones that stick in my head…

« Back to Blog Main Page |

0 Comment(s)

Leave Comment

Name:
Comment:  
 
Security Check: 
 
 
Edentity Web Systems Inc.
Suite 201
40 Spadina Ave.
Toronto ON
M5V 2H8
Tel:
416.591.2500
Fax:
416.352.5270
Home | Who We Are | What We Do | Clients & Brands | Careers | Contact

Copyright © 2010 Edentity Web Systems Inc. Privacy Policy