Sorry if this is noobish, but I'm new to development and am teaching myself.
Let's say I've got 2 tables
BioData
Name (string)
Birthdate (datetime)
BloodType (int)
BloodTypes
BloodTypeId (int)
BloodTypeName (string)
When I pull a record, i'll use a join, so that I pull the BloodTypeName and not just ID.
Now, should my class structure mirror these tables, or am I safe to build a "Person" class with
public class Person {
string Name;
DateTime Birthdate;
string BloodType;
}
If I do build class as indicated above, it seems I would have to do some funkiness when it comes to inserting records into by DB because I want to show BloodTypeName to the user, but I have to insert the relevant integer into the db.
Any insight on best practices would be appreciated.