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

Derek Comartin

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

Environment Variables in ASP.NET Core

In my last post, I covered how to handle sensitive configuration data by using User Secrets while working in development or on your local machine.  The next step is how to use environment variables in ASP.NET Core once you deploy to production (eg Azure App Service)? If you have any questions, please follow me on Twitter.   https://www.youtube.com/watch?v=InyWktgdWJUVideo can’t be loaded because JavaScript is disabled: Multiple Environments in ASP.NET Core (DEV, PROD) (https://www.youtube.com/watch?v=InyWktgdWJU) IHostingEnvironment In your ASP.NET Core Startup class, the ctor has a IHostingEnvironment parameter.  One of the properties on it is the EnvironmentName.  Along with this are a few… Read More »Environment Variables in ASP.NET Core