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

Paging Azure Cosmos DB Query Results from .NET

I received a comment on my Azure Cosmos DB Transactions from .NET post from Onur: The thing I don’t like about Azure Cosmos DB is that it doesn’t support aggregations nor paging. This was actually some pretty good timing of this comment as I just ran into a situation of a side project that required to page through  a result set. Skip & Take It does not appear that Azure Cosmos DB supports (yet) SKIP and TAKE, which you would expect to use in order to do paging.  Because of this, you can’t implement all the same functionality you might expect. But there… Read More »Paging Azure Cosmos DB Query Results from .NET

Azure Cosmos DB Transactions from .NET

I received a comment to my Optimistic Concurrency in Azure Cosmos DB  a couple weeks ago from Jerry Goyal: Can we somehow handle the concurrency among multiple documents (transactions)? Since ETags are defined on each document, you must build your concurrency around them.  However, this made me start to wonder how to update multiple documents at the same time using their respective ETags.  Meaning you would want both documents to update together only if both of their ETags were current.  If one was valid and the other was out of date, none of the documents would update. Transactions It’s pretty obvious… Read More »Azure Cosmos DB Transactions from .NET

Queries with Mediator and Command Patterns

I recently got a really great comment from my post on using Query Objects instead of Repositories.  Although that blog post is now 2 years old, I still use the same concepts today in my applications. What I thought may be relevant is to elaborate more on why and when I use the mediator and command pattern for the query side. It may seem obvious on the command side, but not really needed on the query side. Here a portion of the comment from Chris: I’m struggling a bit to see the killer reason for using Query objects over repository. I can see… Read More »Queries with Mediator and Command Patterns