Small LINQ Trick for Converting List<String> to String Text List
Wednesday 24 February 2010 @ 2:58 pm
  Here is a shorthand way for converting a list of strings defined as follows: List<string> strings = new List<string> [...]
Comments (3) - Posted in C#, LINQ  


Adding A Sessions Page That Includes a Query Parameter In Silverlight VS2010 Beta2 (Article 6 of 7)
Monday 25 January 2010 @ 4:22 pm
    Title Of Each Article Video Included With Each Post Part 1 Introduction To RIA Services In Silverlight (This Article) 7 Minutes Part 2 Basic RIA Services And DataGrid With  VS 2010 Tooling 14 Minutes Part 3 Adding A DataGrid With Connect The Dots DataBinding in VS [...]

Most Amazing ReFactor Using ReSharper EAP 5.0 I’ve Seen!
Friday 4 December 2009 @ 11:27 am
  This one is just to amazing to not blog about.  I’ve been a die heart ReSharper Icon that is) so I hovered over to see what it wanted.   And, I chose what it suggested, and wow!  check this out.   The way I should have coded it in the first place. private static int GetTransitTime(string [...]
Comments (4) - Posted in LINQ, ReSharper  


Converting From System.Data.Linq.Binary to String and Back
Sunday 8 November 2009 @ 10:49 am
  Just a quick post in case anyone is wasting 10 minutes figuring out how to do this.  For me, this came up because in encoding) So, in my C# code, here is what you need to convert to the Linq.Binary:Linq.Binary carrierMatrix = new ASCIIEncoding().GetBytes(myString);And, to go back from Linq.Binary:string carrierMatrixString = [...]
Comments (1) - Posted in C#, LINQ, LINQ to SQL  


Using LINQ to Convert an Array Into a Generic List with C#
Wednesday 14 October 2009 @ 5:35 pm
  This is just going to be a short post, but I bet it’s something I do a large number of times so I thought I’d blog it.  Say you get back from something like a web service an array of objects. In my case this:cmRateResult[] cmRateResults = TransiteUtils.MakeRateRequest(_cmRateRequest); .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, “Courier [...]
Comments (5) - Posted in ASP.NET 3.5, C#, LINQ  


LINQPad Help For Creating Nasty Group by Query in Native SQL
Monday 28 September 2009 @ 9:51 am
  I often speak very highly of Group By,
Comments (1) - Posted in C#, LINQ, LINQ to SQL, TSQL  


Some Really Cool LINQ to Help Performance and Show Line Thickness
Friday 18 September 2009 @ 10:49 am
  I’ve done a bunch of Lat/Long type mapping programs over the years and one of the problems always ends up around performance.  A common problem is that you keep redrawing the same line over and over and over.  The pixels you are drawing don’t get any darker so all you are doing is [...]
Comments (0) - Posted in LINQ, Visual Studio  


Using LINQ2SQL, Use Group By To Get List of Top Occuring Values
Thursday 3 September 2009 @ 4:05 pm
  So, I’m really enjoying using LINQ and specifically
Comments (0) - Posted in C#, LINQ, LINQ to SQL  


Interesting LINQ side affect, Pass in empty List<int> using Contains and Get Where 0 == 1. Hmm
Sunday 14 June 2009 @ 8:21 am
  We’ve built a data access layer on top of LINQ2SQL for dynamically building the layer we call for data access.  It’s convenient because we pass in a query object as a parameter that has a bunch of nullable variables in it.  Here is kind of what it looks like: [...]
Comments (4) - Posted in C#, LINQ, LINQ to SQL  


Combing LINQPAD with LINQ In Action From Manning
Tuesday 9 June 2009 @ 9:08 am
  Last night, I had the honor of having dinner with three other LINQ in Action.  Jim is a wealth of knowledge as well as very entertaining.  He had an interesting analogy for what using try/catch statements to handle expected issues.  I’ll leave it up to you to post to his twitter account and [...]
Comments (1) - Posted in LINQ, LINQ to SQL  


780 Requests Per Second Verses 110, You Really Need to Compile your LINQ to SQL (LINQ2SQL) Queries
Monday 8 June 2009 @ 10:21 pm
  So, I’ve been on kind of a rant lately about how slow uncompiled LINQ2SQL. So, to put some more substance behind my claims, I’ve written a small test application using Visual Studio 2008 that compares the performance of using LINQ2SQL compiled verses non-compiled on a trivial web page. Here are some [...]

Not Sure If I’ve Said Often Enough.. I LOVE LINQPAD!!!
Thursday 4 June 2009 @ 6:30 am
  I’ve been doing a lot of LINQ2SQL lately and just in case I have not said it loud enough how enthusiastic I am about
Comments (0) - Posted in C#, LINQ, LINQ to SQL  


How Fast are In Memory LINQ Evaluations for Doing Simple Things?
Wednesday 3 June 2009 @ 6:27 pm
  So, I recently blogged about the huge penalty for not compiling your LINQ2SQL.  This problem is so big that it occurred to us that maybe all of LINQ has the problem.  So, time for a simple test.  Below is a very simple program that basically generates a list of Ids.  In one case, [...]

How to Create a Generic Integer List From a List of Objects Using LINQ
Wednesday 3 June 2009 @ 10:02 am
  So, this is very straight forward, but I sometimes forget it.  I figure I’ll do a short blog post on it so next time I search for it, I’ll probably hit my own blog post. So, say you have a list of objects as follows: public partial class CompanyAddressResult : ResultBase [...]
Comments (0) - Posted in C#, LINQ  


LINQ To SQL Very Slow Performance Without Compile (CompileQuery)
Wednesday 6 May 2009 @ 10:23 am

In this article, it is shown how important it can be to use the CompileQuery class when using LINQ to SQL. Doing a simple query in LINQ to SQL verses ADO.NET is shown to run 37 times slower without taking advantage of the Compile feature in LINQ to SQL. If you are doing the same query over and over in LINQ to SQL, this is a no brainer. I’m surprised I did not know this myself previously.

Performance of LINQ to SQL compiled verses not and ADO.NET

ASP.NET 3.5 Social Networking by Andrew Siemer (Book Review)
Wednesday 25 March 2009 @ 2:04 pm
  Structure Map (IOC) Error Handling Social Network Schema Designs (Friends and Groups) Messaging Data Layers (

Logging your Sql with LINQ Update Commands. Simple Logging to your Visual Studio 2008 Debugger Output Console
Thursday 4 December 2008 @ 9:13 pm
  So, you want to do an update but are wondering what the hec LINQ is doing.  Turns out it is really easy.  All you have to do is run in the debugger and add the Log option to your data context. Here is an example: DataClassesGeneralDataContext db3pLogicContext; [...]
Comments (0) - Posted in LINQ, Visual Studio  


LINQPad is Totally Awesome at Testing and Writing LINQ Queries
Saturday 20 September 2008 @ 9:25 pm
Google looking for something similar to what I want, then I put it into my application and run it. This has worked pretty well, but it takes a couple iterations to get it right. It occured to me that someone probably has written a LINQ interpreter so I just guessed the name, Ben Albahari, (which [...]

Convert Garmin 705 Navigator TCX Format using LINQ to XML and Data Objects – Article 1
Saturday 16 August 2008 @ 4:51 pm

In this post, we will discuss what is necessary to convert the file created from a Garmin 705 navigator to C# .net Data Objects. We will use LINQ to XML to perform this function

Comments (5) - Posted in ASP.NET 3.5, Garmin, LINQ, XML  


Using LINQ to Merge Mailing Lists and Filter Opt OutsBuilding the Code Camp Web Site (Article 5)
Thursday 3 July 2008 @ 8:33 am

Combining two mailing lists with LINQ, then removing a third is demonstrated in this post. Using C# 3.0 with .Net 3.5 allows us to leverage LINQ to make this an easy process. This post shows and explains the LINQ code to do this




Next Page