Using Command Pattern to capture language and intent for services

This is a follow up to my previous post http://rogeralsing.com/2013/12/01/why-mapping-dtos-to-entities-using-automapper-and-entityframework-is-horrible/ That post was about both the technical and conceptual problems faced when using DataTransferObjects(DTOs) as the base of your service design. In this post I will try to show you another way to model services that does not suffer from those problems on neither plane. First,…More

Entity Framework to REST – EfREST

I’ve been doing a fair amout of rest API coding lately, and what struck me during this time was that it was horribly hard to actually create a clean custom REST API using .NET. Sure, there is WebApi and OData and alot of other stuff. Odata almost gets me where I want to be, but…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