Why mapping DTOs to Entities using AutoMapper and EntityFramework is horrible

One of the most common architectures for web apps right now is based on passing DataTransferObjects(DTOs) to and from CRUD services that updates your business/domain entities using tools like AutoMapper and EntityFramework. I will try to explain why this is a truly horrible approach. Horrible from a technical perspective Firstly, lets set up a scenario…More

O/R Mapping and domain query optimizations

One of the cons of O/R mapping is that the abstraction is a bit too high. You write object-oriented code and often forget about eventual performance problems. Take this (somewhat naive) example: For a given customer, we iterate over all the orders and all the details in those orders and calculate the sum of quantity multiplied…More

NWorkspace / Linq Workspace Followup

I’m still playing around with the outcome my Linq Workspace Experiment. And I have to say that I’m fairly pleased with the result, it’s only a handful of code (less than 100 LoC) but it makes testing so much easier. I’m so pleased with it that we will be using this in a fairly large…More