I'm setting up a new ASP.NET Core project and in my MVC project, I wish to use Identity for user registration/login etc.
I could write my own, but I really want to make use of the authorization attributes in my controllers and actions.
However, I want to extract the Identity part to a separate project so my MVC project doesn't have a direct dependency to Entity/DBContexts.
When creating a new MVC project with Identity, it creates:
- Services
- Migrations
- ApplicationDBContext
As well as having references to:
- Microsoft.AspNetCore.Identity.EntityFrameworkCore
- Microsoft.EntityFramework.*
Is there any easy way for me to extract all Identity code to a separate project, where my Controllers just use the services from that project (injected in the constructor of the controllers)?