Archives
-
LINQ: Quickly Create Dictionaries with ToDictionary
Donn Felker recently blogged about a neat little extension method in LINQ called Any(). If you simply want to know if a sequence contains any elements, many people use ".Count() > 0" which will walk the entire sequence to compute the count whereas .Any() will stop walking as soon as it finds a single element. Easy and much more efficient.
-
SRT Presents Software Stimulus Lab to Support Economic, Business Growth
I've been so busy recently I totally forgot to blog about this. We (SRT) are going to be hosting a Software Stimulus Lab at Automation Alley next Monday, June 15th. We've got a press release that covers the details better than I can but the important things are:
-
ActiveRecord: Loading Records by Primary Key
I was reviewing some code today for a project that uses ActiveRecord. One of the things that stood out for me was the use of a query to find objects by their primary key. There's two reasons this raised a red flag for me:
-
NHibernate Queries: HQL vs. Criteria API
As someone who did a lot of SQL a few years ago, I was immediately more comfortable using HQL for my ActiveRecord queries than the Criteria API. But from a documentation/samples standpoint, I see a much higher percentage of the Criteria API being used vs. HQL. I still use HQL most of the time.