© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•13mo ago•
1 reply
ThangBoc

BL - UserManager custom role

Let's say when registering a new user to the web api. For my use case (since I am doing role based access priority) I need to create a default role "User" I wonder how it is done normally.

I am thinking about doing it directly inside the program.cs in the server side

In my last project I did it like this hardcode alongside admin user
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

❔ Implementing RoleStore/RoleManager
C#CC# / help
3y ago
BL Mapping help
C#CC# / help
12mo ago
Mock UserManager in unit tests (Student)
C#CC# / help
14mo ago
Concurrency Failure while updating user in UserManager
C#CC# / help
16mo ago