As far as I know, DBContext or the underlying persistence technology should only be contained in the data layer.
Moreover, it seems to me very bad to have an identity package in the user interface layer. The identity must be the responsibility of a centralized business layer, which, if any, should be able to be used by other parts of the application (eg, wpf, forms, projects Web-api, etc.), not just asp.net front-end.
If I separate the identity of another layer, the problem is partially solved, but this time, I have to specify the DBContext in the Startup.cs file for the front-end interface, which only needs refer to the management layer and work with View Models or DTO.
The management layer must provide the authorization / authentication services and attributes to decorate the relative methods of the permissions.
Anything with the name "ASP.NET" must be contained in the UI layer.
In addition, the dependency injection infrastructure should also be partially configurable over multiple layers of the application, which should allow to specify the required instances of specific classes within this application. layer.
I am extremely confused about the choice of architecture in .NET Core.
Thank you for guiding me to the right way to create the right architecture.