© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•4y ago•
17 replies
pyrodistic

Enum or SQL Table?

Hello,

I'm doing a CRUD system for animals using MCV (.NET 5). So I thought to have AnimalClass, AnimalSpecies, and AnimalSex as properties.

AnimalSpecies is going to be a SQL Table since I might want to allow the user to add species, it's going to have to depend on AnimalClass as a FK so I think the easiest way is to make AnimalClass a table as well (though the values are not supposed to change). The 3 values on the AnimalSex are fixed aswell, so I'm thinking it might make more sense as a enum?

Does this make sense?

I've never used enum, how would I go about using the enum in this case?

Thanks in advance.
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

❔ SQL: Shared data. One or two table
C#CC# / help
3y ago
❔ SQL Table to Object
C#CC# / help
3y ago
Use exceptions or error enum?
C#CC# / help
3y ago
SQL Server Table Import Issue
C#CC# / help
13mo ago