© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
4 replies
rokibox

✅ REST Create-endpoint best practice.

I am creating an endpoint to add a user. The Users table is related with the Roles table. How should I implement the transfer of the user's role: accept a string with the name of the role, and throw an error if there is no such role? Or accept role id and have an endpoint to get all roles?
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

❔ Tests best practice
C#CC# / help
3y ago
Concurrent REST requests best practices if any? [Answered]
C#CC# / help
4y ago
Best practice for class constructors?
C#CC# / help
2y ago
❔ best design practice for this?
C#CC# / help
4y ago