Author Archives:

Survey of two large MVC projects

A large-ish MVC project in which I led the architecture is hitting a milestone of 12 months in development (though released to production for some months now). It’s a similar project to the one where AutoMapper came from, but this … Continue reading 

Posted in ASP.NET MVC | 25 Comments

Missing EF Feature Workarounds: Filters

Filters are one of those ORM features that when you need it, you REALLY need it. NHibernate has had this feature for quite a long time, but it still doesn’t exist in EF. What are filters? In NHibernate, a filter … Continue reading 

Posted in Entity Framework, NHibernate | 21 Comments

A better domain events pattern

Domain events are one of the final patterns needed to create a fully encapsulated domain model – one that fully enforces a consistency boundary and invariants. The need for domain events comes from a desire to inject services into domain … Continue reading 

Posted in Domain-Driven Design, Entity Framework | 77 Comments

Missing EF Feature Workarounds: Encapsulated collections

The list of missing EF features is quite long, but several of the items in the list do have workarounds. For encapsulated domain models that enforce their own consistency boundary, encapsulating a collection is quite important to ensure your domain … Continue reading 

Posted in Entity Framework | 31 Comments

Missing EF Feature Workarounds: Cascade delete orphans

Currently, Entity Framework cannot cascade delete orphans. In fact, there’s not a real concept of parent-child relationships, there’s only navigation properties, collection properties, and a notion of required/optional relationships. You can cascade delete if a parent is deleted, but if … Continue reading 

Posted in Entity Framework | 11 Comments

Projecting computed properties with LINQ and AutoMapper

Another from the “wicked awesome” category of AutoMapper. Other blogs about AutoMapper and LINQ: Efficient querying with LINQ, AutoMapper and Future queries Using AutoMapper to prevent SELECT N+1 problems Using AutoMapper to perform LINQ aggregations One current limitation of ORM … Continue reading 

Posted in AutoMapper | 7 Comments

Missing NHibernate features in Entity Framework

Recently I blogged about migrating to EF from NHibernate and how easy it is to create fully encapsulated models mapped to EF. In this particular project, migrating was relatively painless, as it was a fairly new schema and quite amenable … Continue reading 

Posted in Entity Framework, NHibernate | 20 Comments

Domain modeling with Entity Framework scorecard

A long, long time ago I had a series on strengthening your domain, highlighting how simple refactoring tools and code smells can help guide your models to push behavior down into your core domain model/business objects/whatever. All the techniques highlighted … Continue reading 

Posted in Domain-Driven Design, Entity Framework, NHibernate | 22 Comments

Migrating from NHibernate to Entity Framework

I’ve been a supporter and user of NHibernate for nearly 10 years. While not part of the original NHibernate Mafia, I’ve long enjoyed NHibernate’s ability to rich, behavioral domain models. I wasn’t happy with the initial designs of Entity Framework, … Continue reading 

Posted in Entity Framework, NHibernate | 48 Comments

AutoMapper 3.2.0 released

Full release notes on the GitHub site Big features/improvements: LINQ queryable extensions greatly improved ICollection supported MaxDepth supported Custom MapFrom expressions supported (including aggregations) Inherited mapping configuration applied Windows Universal Apps supported Fixed NuGet package to not have DLL in … Continue reading 

Posted in AutoMapper | 17 Comments