Add Multi-Tenancy to Asp.Net Core Identity

Now I think it starts to get a bit more interesting.  I would like my API to be able to handle Multi-Tenancy.  For this situation we need to add a whole new class/table to Asp.Net Core Identity.  It is not as bad as it sounds. Create the Tenant Let’s start by creating a Tenant object. And let’s look at that…

Read more »

Customize Asp.Net Core’s IdentityUser

In the last post we set up the Asp.Net Identity database and saw that our tables were all created for us.  There is a lot of fields in the AspNetUsers table but if we do a bit of forshadowing….we know that we will need some extra fields. I would like to show the user’s name when they are logged in…

Read more »

EF Core and Defeating The Self Referencing Loop

I have come across an error “Self referencing loop detected for property…..” when working with EF Core. Turns out, EF is trying to return data that inherently has a self-referencing loop. The Json serializer is trying to take your object graph and create a hierarchy. For example, say we have an object called Order, an object called Product, and an…

Read more »