I have a somewhat complicated Class that may or may not contain a list of items of the same type
Class Items
{
List<Items> SubItems ...
}
The class itself is serializeable, however its going to be a giant waste of space to serialize the objects in the list since they are serialized and added to the database prior to being included in the list.
Is there a way that I can specify that the list should be represented as a list of integers when its serialized ?
Note: These integers will represent primary keys of the rows where the serialized object is located.