SQL Server integration testing using xUnit

Recently I wanted to verify that my data access layer could properly read and write to a SQL Server database, and I wanted to have these tests automated. I wanted to answer these questions:

  1. Can my DbContext roundtrip entities to the database and back?
  2. Does the schema in my migration scripts match the expected schema in my code? (follows from 1)
  3. Can my migration scripts be applied to the database correctly?

Since I was using SQL Server I could utilize SQL Server LocalDB that comes with Visual Studio. To keep performance acceptable I do not want to create and destroy a database for each test, so I need a way to reset the database after a test has run.

Hosting an ASP.NET Core web application in Azure

As a side project, I am working on a web application that I want to host in Azure eventually. There is a ton of documentation available around Azure but instructions vary by product. I have documented the steps I needed to run a web application in Azure.

To make it easier to automate the deployment steps I am avoiding the Azure portal. I want to script these steps later so that I can automate my deployments. Everything I want to do can be done using the Azure CLI so, for now, I will be using that.