Creating a User entity while decoupling ASP.NET Core Identity from the Domain layer according to Onion Architecture

89 views Asked by At

I am creating a project where I need to use Identity within the Onion Architecture, and I am having a problem. My schema requires a User entity that would obviously have relations with other entities.

I can't figure out how to define this ApplicationUser entity that is supposed to inherit from the IdentityUser class like this:

public class ApplicationUser : IdentityUser
    {
    }

all within the Domain layer so I could relate it to other entities defined there while keeping the Domain independent of ASP.NET Core Identity.

Is there a way to do this or is this just an inescapable coupling?

0

There are 0 answers