Should we avoid using ORMs on the read side of our model?

I’ve seen the suggestion below¬†before to avoid ORMS on the read side. This may be appropriate on occasion when you have complex queries or object graphs but as a universal rule (eg. “Don’t use ORM on the read side”) this gets a 👎🏻 from me.

Every modern ORM can select specific columns without “loading the earth”. Entity Framework for example can select columns into either an anonymous type or a strongly typed DTO class.

Developer ignorance about how to do this does not mean it’s not possible. You give up a lot of maintainability benefits if you never use an ORM for the read side of your model.

My initial share of the original post on LinkedIn

Leave a Reply

Your email address will not be published. Required fields are marked *