6 Nov
2007

Querying Sub-Types with Linq

When querying with linq the background compiler automatically infers type information from any implementation of IEnumerable<T> as IEnumerable<anonymous type>. This gives us the IntelliSense we know and love while writing a query against a known type, without being bound to query results of which are of that type. Instead we can project onto new known […]

Read More
6 Nov
2007

DTOs / Presentation Model and ICriteria

When I posted about NHibernate Projections I used HQL (IQuery) in the repository to define the query. There are a some things that I don’t like about HQL. For example the query is defined as a string. Strings are problematic because errors can’t be detected at compile time. ICriteria queries go some way to alleviating […]

Read More