Aney Adventures Online
To understand your parents' love, you must raise children yourself.

I've Left Query Analyzer Hell For LINQPad Heaven

Thursday, 4 December 2008 01:29 by Terry Aney

So now that LINQPad has enabled intellisense SQL Server Management Studio, Query Analyzer, and even Joseph Albahari's (LINQPad creator) own QueryEx have all been zapped from my memory.  I'll no longer flounder in antiquated ANSI SQL, but instead flourish in fully typed C#/LINQ code.... [More]

Currently rated 5.0 by 2 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags:  
Categories:   C# | Extension Methods | LINQ
Actions:   E-mail | Permalink | Comments (4) | Comment RSSRSS comment feed

LINQ to SQL Batch Updates/Deletes: Fix for 'Could not translate expression'

Sunday, 20 April 2008 23:10 by Terry Aney

I've found and posted a new fix in the code from my original post: Batch Updates and Deletes with LINQ to SQL.  I'm not sure of the etiquette for this sort of thing: new post (like I'm doing) or just a comment in the original post.  But since I did get a fair amount of hits to the article but minimal comments, people who may have downloaded the code wouldn't get an update notification and I want to be sure to make them aware of an issue/fix (assuming they are monitoring via a RSS feed).... [More]

Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags:  
Categories:   C# | LINQ
Actions:   E-mail | Permalink | Comments (12) | Comment RSSRSS comment feed

LINQPad: Preview DELETE and UPDATE SQL before it executes

Friday, 18 April 2008 03:06 by Terry Aney

Like everyone else (or at least you should be), I use LINQPad throughout the day non-stop.  Primarily for database maintenance that would have previously been done by saving a *.sql script.  However, at first when I was new to LINQ (not that I'm a complete expert now), I'd get hesitant when I was about to perform a bunch of updates and/or deletes against my production data.  Being more comfortable in Transact SQL than in LINQ, I wanted to see the SQL statements that would execute before actually calling SubmitChanges().  As plenty of posts have mentioned, it is far more than simply a LINQ to SQL execution tool, but rather:

And LINQPad is more than just a LINQ query tool: it's a code snippet IDE. Instantly execute any C# 3 or VB 9 expression or statement block!

- Joseph Albahari (creator of LINQPad)

With a couple of extension methods, you can do exactly that: preview the SQL before it executes.... [More]

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags:  
Categories:   Extension Methods | LINQ
Actions:   E-mail | Permalink | Comments (0) | Comment RSSRSS comment feed

Batch Updates and Deletes with LINQ to SQL

Monday, 14 April 2008 04:07 by Terry Aney

A couple weeks ago, I read the article, LINQ to SQL Extension: Batch Deletion with Lambda Expression by Jeffrey Zhao.  In case you didn't read the article, it discusses the downside of most O/R Mapping frameworks when it comes to multiple updates or deletes.  He states the fact that a SQL statement for each row flagged as update/delete in the entity set is created.  I went about implementing something similar to what Jeffrey envisioned and I'll explain some of the hurdles I had to overcome to achieve it.... [More]

Currently rated 5.0 by 12 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags:  
Categories:   C# | Extension Methods | LINQ
Actions:   E-mail | Permalink | Comments (24) | Comment RSSRSS comment feed