Best way to save type of class in database?
问题 What is a good way to denote "type" in database? I have a base class Action which is inherited by numerous child classes. Action has members like Id , Name etc all which corresponds to equivalent columns in a table in the database called action . So action table looks like this: id | name | type The type column denotes what action it is. In my code they correspond to the child classes deriving from parent Action . Now how do I save the type of class to the type field in database ? The type