My past articles here on Medium covered fairly low-level topics, more in the form of Lego blocks that can be used as elements for building larger components. For example, we looked at how to use transactions with NHibernate. We also introduced dependency injection (DI) with Autofac.
In this article, we will combine two elements, i.e., we’ll combine NHibernate transactions with Autofac. At a high level the benefits of this approach are:
How fast is the test suite for your backend? Can you run 10,000 tests per minute on a laptop? If you can’t then in this article, we will look at techniques that will assist getting towards that speed. And yes, I am involved in at least one project where the test suite runs at a speed of up to 10k tests per minute.
How is this possible? There are several fundamental factors to consider:
The first factor means that you don’t want tests to access a drive…
In this article:
As software engineers we are continuously tackling complexity. Any technique that makes our lives easier is welcome. Dependency injection (DI), which is one way to achieve Inversion of Control (IoC), is one such technique. It helps us breaking complex software components down into smaller, much more manageable pieces of code. In this article I’ll provide a gentle introduction to using Dependency Injection in…
In this article:
In previous articles, we introduced NHibernate as the Object-Relational Mapper (ORM) to access data in a relational database. We then added transactions to keep data consistent. This will become more important in this article because we will expand our domain model with a one-to-many relationship.
In this article, we’ll again be using as a running example a fictitious product named “Mahi”. …
Keeping your data consistent while avoiding code duplication
In this article:
In the previous article we introduced NHibernate as the Object-Relational Mapper (ORM) to access data in a relational database. We managed to write and read objects, which was a good first step. In this article we’ll build on this and look at how we can keep data consistent.
In this article we’ll again be using as a running example a fictitious product named “Mahi”. The word Mahi means “task” in Te Reo…
Storing and reading data in a relational database without writing SQL
In this article:
In previous articles we looked at how to set up the development environment with Docker including a separate container for the relational database. We also looked at maintaining the database schema with Fluent Migrator and we updated the dev container to .NET 5.0. …
Changing the target framework and other dev environment improvements
In this article:
Previously, we looked at how to create a dev container for .NET Core 3.1. Since then .NET 5.0 has been released. Therefore, in this article we’ll look at how upgrade the dev container to reflect those changes.
As always, we’ll again be using as a running example a…
In this article:
Originally, I though this article would be about object-relational mapping (ORM) on .NET Core. Then I ran into what I thought were issues with VS Code extensions when I ran up dev containers that made use of NTFS folders mounted into the dev container.
…
Database Schema Maintenance with Fluent Migrator
In this article:
In a previous article, we created a dev container (see article “Building a Dev Container for .NET Core”). Then we added a second container to run a database server we can use during development (see article “Dockerized SQL Server for Development”). This also served as an example how we can use pre-built container images to make our lives easier as developers.
At this point we…
How to quickly spin up and use a SQL Server instance cross-platform.
In this article:
In my previous article I described how to create a full-time development container for .NET Core 3.1 with VS Code. The key point is that the development container (or short “dev container”) not only runs for specific tasks such like compiling, debugging, etc. The idea is to keep the dev container running all the time.
In…
I’m a Principal Consultant at boutique firm HYPR Innovation in New Zealand. Currently, my main focus is helping clients to build scalable SaaS products.