ВВассралман
Mapping to avoid data dublicating.(Just help with ideas)
Hello, guys! I have a question. If I have a domain model Customer that is used in services, but at the same time I'm using ASP.NET Core Identity, where the user already has all the properties of my Customer, I end up duplicating data and storing it in the database. My Customer model has no unique properties. Can I somehow configure the logic to map or retrieve information from the AspNetUsers table and map it to Customer (I need the ID or email)?
11 replies
I am implementing role-based authentication using ASP.NET Identity. I have issue with assign roles
Hello guys, I am implementing role-based authentication using ASP.NET Identity. I have already added three roles: Member, Admin (can create resources), and Owner (can assign roles, grant or revoke the Admin role). I want to keep my controllers clean and move the logic to the infrastructure layer, but something feels wrong. I can't write proper code to prevent the Owner from demoting themselves. Any ideas?
4 replies