Skip to content

Sponsor: Do you build complex software systems? See how NServiceBus makes it easier to design, build, and manage software systems that use message queues to achieve loose coupling. Get started for free.

Learn more about Software Architecture & Design.
Join thousands of developers getting weekly updates to increase your understanding of software architecture and design concepts.


Follow @CodeOpinion

CQRS

Fat Controller CQRS Diet: Simple Query

This is a series of blog posts that demonstrate how to thin your controllers by implementing commands and queries using the MediatR library.  For demonstration, I’m converting the MusicStore application that’s using ASP.NET Core MVC. For more information on the purpose of this series, check out my initial post. Follow Along You can get all the code for this entire series on on my fork of the MusicStore app GitHub.   If you have any improvements or suggestions, please create an issue or send a PR and I’ll be sure to include it in any of my blog posts. https://www.youtube.com/watch?v=hilMOUL6GHAVideo… Read More »Fat Controller CQRS Diet: Simple Query

Fat Controller CQRS Diet

I’ve been meaning to create a sample application that uses the MediatR library to dispatch command and queries.  All of this organizing and writing your code in vertical slices rather than layers. Why? I can only speak from my experiences and how I came to applying CQRS with mediator pattern.  Hopefully you can can relate and translate it to your own code base and determine if it is a right fit for you. And that’s really important.  Is it a right fit for your application. What this series will demonstrate is not to be used as silver bullet. Nor should… Read More »Fat Controller CQRS Diet

Web API: Resource Model isn’t your Data Model

I was recently reminded of some troubles I had awhile ago which were caused by exposing my data model. This tweet by Mike Amundsen brought up some thoughts that I had yet to share, and why I now suggest that you don’t expose your data model. remember, when designing your #WebAPI, your data model is not your object model is not your resource model is not your message model #API360 — Mike Amundsen (@mamund) August 21, 2016 OData A good illustration of the above is with how you see most examples of using OData with .NET and Entity Framework. The problem lies… Read More »Web API: Resource Model isn’t your Data Model