Returns the function that converts an enumeration instance T to a value that will be stored to a database.