Azure Active Directory (Azure AD)

How to find out the Directory ID of your Azure AD tenant?

This article explains in extremely short way, how to fetch your Azure Active Directory tenant’s Directory ID. Let’s make it short and sweet, because quite frankly, it is really simple! Solution Option 1: Use whatismytenantid.com for finding your tenant/directory id: Quick solution – works (at least) for all standard tenants: Navigate to https://www.whatismytenantid.com/ Enter the domain associated with your Azure AD instance (often like contoso.onmicrosoft.com) Let ShareGate do their magic and find your tenant/directory id for you! Thanks to Thomas Vochten for pointing this out…Continue reading How to find out the Directory ID of your Azure AD tenant?

One does not simply use just one DbContext with multiple ConnectionStrings in Entity Framework Core.

How to implement multiple Connection Strings for one DbContext in EF Core?

Recently, while building an app service to host a .NET Core API, I had to implement the logic for using both Read-Only and Read-Write Database Contexts for Entity Framework Core. In this particular case, it was the same database – just different contexts, because depending on the location of the app service the app was deployed in, read and write operations might actually go to different database instances, That’s really easy, right? Well… Yes and no. Essentially, it’s easy to spin up, but comes with…Continue reading How to implement multiple Connection Strings for one DbContext in EF Core?

Microsoft SQL Server logo

How to clean up duplicates from MS SQL Database?

This article explains how to query and remove duplicate entries from a Microsoft SQL database using T-SQL. The same model works both for Azure Databases (in Azure SQL Query Editor) and databases on MS SQL Server (using SSMS – SQL Server Management Studio). Background Why bother? That’s a (somewhat) valid question. A table in a SQL database can have quite a few rows as long as you have plenty of storage space available. The number of rows might (technically speaking) be limited by the maximum…Continue reading How to clean up duplicates from MS SQL Database?