Merging Expression Trees to Reuse in Linq Queries

Reusing parts of LINQ queries is easily done by chaining methods returning IQueryable. Unfortunately that doesn’t cover some senarios like reusing member initialization lists. To handle such a situation I wrote a Merge extension method for select expressions. For this post we’ll load the data required for a list of cars and a detail view… Continue reading Merging Expression Trees to Reuse in Linq Queries

Always Check Generated SQL

OR-Mappers are great for making data access easier, but they are not an excuse for learning SQL. As an application developer, I’m responsible for all the SQL queries issued by the application. If I use an ORM, it’s my responsibility to check the generated SQL. I’ve already written another post named Always Check Generated SQL… Continue reading Always Check Generated SQL

IQueryable Read Model Extension Methods

The normalized data model of the database is often not suitable for reading and displaying data. A separate read model used to represent all the data needed to display a page improves performance. Defining the read model is only half the work though, to make it really usable the read model should accept queries in… Continue reading IQueryable Read Model Extension Methods